Skip to content

I.type()

I.type() sends keystrokes to the currently focused element. If no element is in focus, the keystrokes are sent to the <body> element.

Usage

js
I.type(text: string)

Parameters

ParameterTypeDescription
textstringThe text to type

Example

js
I.click("Search")
I.type("hello world")
I.pressEnter()

In the example above, the test will first click on the "Search" element so that it receives focus, and then type "hello world".