Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

selenium get parent element

element = driver.find_element(By.ID, "id1")
parent_element = element.find_element(By.XPATH, "..")
 
PREVIOUS NEXT
Tagged: #selenium #parent #element
ADD COMMENT
Topic
Name
4+2 =