Duplicate elements on Amazon

Hi,

I am trying to get the price of first items on Amazon.
I can do it with a long relative path, but I am trying to get with short path.
I find per example “cafe/coffee” check Amazon prime and more than 4 stars and get the first price of the first product. How I said… I can do it without rude relative XPath, but… I want to put this XPath: //span[@class=‘a-price-whole’] but get 66 items. How can put a command to get the first element like [1]?

Thank you

XPath (//span[@class=‘a-price-whole’])[1] should work.

1 Like

I was tested this code and it is work.

1 Like

Glad it helped :slightly_smiling_face: