parent
The command to get the parent of the current element.
Last updated
The command to get the parent of the current element.
Element.parent() -> Elementpy.get("li").parent()
---or--- # store in a variable
element = py.get("li").parent()
---or--- # chain an Element command
py.get("li").parent().click()
---or--- # even go up the DOM tree
grand_parent = py.get("li").parent().parent()None
Element - The parent Element
Last updated