0
driver.find_elements(By.XPATH, '/html/body/div[1]/div/div[6]/div[1]/div[2]/div[2]')

The above element is returned by the selenium chrome driver but the below element (div with main-content-row class) is not.

driver.find_elements(By.XPATH, '/html/body/div[1]/div/div[6]/div[1]/div[2]/div[3]')

enter image description here

Chetan
  • 469
  • 3
  • 12
  • 27
  • This question is missing basic debugging details. – Prophet Mar 05 '22 at 20:56
  • What are some things i can do to debug this? Both the elements are within the same parent tag as seen in the pic. So i guess it would be in the same iframe as well. Not sure what else can be done here to debug it. – Chetan Mar 06 '22 at 01:48
  • You wrote you can not find 3rd element. In order to help you we need to see that page with our browser. Don't you think so? – Prophet Mar 06 '22 at 07:42

1 Answers1

1

Try providing the relative xpath,

driver.find_elements(By.className,'main-content-row')

or

driver.find_elements(By.XPATH,"//div[@class='main-content-column']/div[3]")

Note: The XPaths can be incorrect because the given information are not enough to provide the exact relative XPath. Please do the modifications you need if it is not working.

Methmal Godage
  • 736
  • 1
  • 6
  • 12