I have 2 elements on my web page with the same class name, and I'm trying to access the second element, and I cannot do this. I tried [position = 1] and put [1] at the end of my xpath expression
driver.find_element_by_xpath("//div[@class='tableType value']")
the above returns the next 2 elements
I tried
driver.find_element_by_xpath("//div[@class='tableType value']")[1] driver.find_element_by_xpath("//div[@class='tableType value'][position=1]")
Can someone please help me with this?
thanks
source share