is_empty

The command to check if the list of elements is empty.

Syntax

Elements.is_empty() -> bool

Usage

correct usage
py.find("a.hidden-link").is_empty()
incorrect usage
# Errors, 'Element' is not a list
py.get("a").is_empty()

Arguments

  • None

Yields

  • bool - True if the length is zero, else False

Last updated