Skip to content

doubleClick()

Fetches an element with the given selector, scrolls it into view if needed, and then double clicks the element. If there’s no element matching selector, the method throws an error.

await doubleClick('Get Started')
await doubleClick(button('Get Started'))
await doubleClick('Get Started', { waitForNavigation: true, force: true })
await doubleClick('Get Started', { waitForNavigation: false }, below('text'))
NameTypeDescription
selectorselector | stringA selector to search for element to click. If there are multiple elements satisfying the selector, the first will be double clicked.
optionsObjectDefault: {}.
options.waitForNavigationbooleanWait for navigation after the click. Default navigation timeout is 30 seconds, to override pass { navigationTimeout: 10000 } in options parameter. Default: true.
options.forcebooleanSet to true to perform action on hidden/disabled elements. Default: false.
argsArrayProximity selectors
TypeDescription
Promise<void>