The command to get the parent of the current element.
Syntax
Element.parent() -> Element
Usage
correct usage
py.get("li").parent()---or---# store in a variableelement = py.get("li").parent()---or---# chain an Element commandpy.get("li").parent().click()---or---# even go up the DOM treegrand_parent = py.get("li").parent().parent()