get_property

The command to get the specified property's value of the element.

Syntax

Element.get_property(prop: str) -> Any

Usage

correct usage
py.get(".nav-link").get_property("innerHTML")
incorrect usage
# Errors, 'py' cannot call this directly
py.get_property("className")

Arguments

  • property (str) - The name of the property.

Yields

  • The value returned by the property, but this is usually a string.

Last updated