Locating Identical Elements (Python)
To differentiate between elements with the same attributes and tag name, you can specify which number element you are referring as shown here:
driver.find_element(By.XPATH, "(//p[@class='title-white'])[2]")
This will retrieve the 2nd element on the page with the tag name p and the class title-white.
Leave a reply
Your email address will not be published. Required fields are marked*