selenium get parent element code example
Example 1: selenium get parent element python
input_el = driver.find_element_by_name('A')
td_p_input = input_el.find_element_by_xpath('..')
Example 2: selenium get element parent
//label[contains(., 'labelName')]/parent::*//input[@value='elementToSelect']