tag_name

The command that gets the current Element's tag name.

Syntax

Element.tag_name() -> str

Usage

correct usage
assert py.get(".btn").tag_name() == "button"
incorrect usage
# Errors, 'tag_name' is not a property
py.get("a").tag_name

Arguments

  • None

Yields

  • str - The tag name of the current Element

Last updated