I'm building a python script using selenium, and have ran into a quite confusing problem.
The website lists products using a name, which is not unique, and a color, which is not unique either. The color and name elements have the same parent.
My script gets user input on which product he wants the script to buy for him, and which color.
I can't for the life of me figure out how to select the right product using the two variables productName and productColor.
<a class="product-name">Silk Shirt</a>
Create a main loop that selects each
div class="inner-article" element.
In the loop, look for elements that have an
h1 child element and an
a class=product-name grandchild element with text of "Silk Shirt", and a
p child element and a
a class=product-color grandchild element with text of "Black".