rightClick
Fetches an element with the given selector, scrolls it into view if needed, and then right clicks the element. If there's no element matching selector, the method throws an error.
Examples
await rightClick('Get Started')
await rightClick(text('Get Started'), { force: true})
Parameters
-
selector -
A selector to search for element to right click. If there are multiple elements satisfying the selector, the first will be clicked.
-
options -
Click options.
-
options.waitForNavigationboolean -
Wait for navigation after the click. Default navigation timeout is 30 seconds, to override pass
{ navigationTimeout: 10000 }inoptionsparameter.- Default value
-
true
-
options.forceboolean -
Set to true to perform action on hidden/disabled elements.
- Default value
-
false
-
argsArray -
Proximity selectors
Returns
Promise<void>