No results for

Powered byAlgolia

focus([options])

Calls focus on the element, if it can be focused on.

ParameterTypeDefaultDescription
options
objectnull

Example

page
.goto('https://test.k6.io/browser.php')
.then(() => {
const textbox = page.locator("#text1");
textbox.focus();
});