The command to type keys into a field, input or text box.
Replaces send_keys from Selenium
Syntax
Element.type(*args) -> Element
Usage
correct usage
py.get("#username").type("my-username")---or---# combine with other keys and strings# import the Keys from seleniumpy.get("#search").type("puppies", Keys.ENTER)---or---# chain an Element commandpy.get("#email").type("foo@example.com").get_attribute("value")
incorrect usage
# Errors, 'type' may have no effect on other types of elementspy.get("a").type("foo")
Arguments
*args (Any) - A comma-separated list of arguments to type
It's best to use strings and the Keys from Selenium
Yields
Element - The current Element so you can chain commands