Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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
7+3 =