go back to 3 parents selenium python code example
Example 1: python selenium go back
driver.execute_script("window.history.go(-1)")
Example 2: selenium get parent element python
input_el = driver.find_element_by_name('A')
td_p_input = input_el.find_element_by_xpath('..')