webdriver-iowebdriver-io-v4wdio-v6

Webdriverio 6 - How to right click at X and Y location


Webdriverio 6 - How to rightclick at X and Y location.

Could not find the rightclick command in WebdriverIO version 6 docs.

this is the code showing in WebdrivewrIO v4 but not working in V6

 browser.rightClick(elementXpath,5,184); 

Error showign is

rightClick is not a function

Is there a way to right click in WebdriverIO V6. Please help.


Solution

  • The best option is to start with reading docs, in this case see click command usage https://webdriver.io/docs/api/element/click.html#usage

    According to the docs you can pass x, y, and button.