get parent element selenium js code example Example: selenium select parent element parent_element = element.find_element_by_xpath('./..')