I'm currently working on compiling a list of all the background-image values to perform assertions on them.
My approach involves creating a parent element and then attempting to gather a list of all the values associated with it.
This is what I have so far:
WebElement Assert_Parent = driver.findElement(By.xpath("/html/body/div[1]/section/div[1]/div[2]/div"));
List<WebElement> Assert_children = Assert_Parent.findElements(By.cssSelector("div.contentInner[name='background-image']"));
System.out.print(Assert_children);
Each photo under this section has its own specific image. Here's the HTML code related to this, which might explain why my current method isn't yielding results as expected.
<div id="contentInner" class="contentInner" style="background-color: transparent;">
...
(HTML code provided in original text)
...
</div>
If you have any insights or suggestions on how to improve my method, please feel free to share. Your input would be greatly appreciated.