Find Parent Of Element With Selenium Python

October 2, 2017
find_element_by_xpath(“..”)
el = driver.find_element_by_css_selector(".content")
if el:
    parent_el = el.find_element_by_xpath("..")
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.