focus

The command to switch focus to the element.

Syntax

Element.focus() -> Element

Usage

correct usage
py.get(".menu").focus()
incorrect usage
# Errors, Pylenium doesn't have a focus() command
py.focus()

Arguments

  • None

Yields

  • Element - The element that has been focused

Last updated