After referring to: PROTRACTOR: Right click on link and open in NEW TAB

I tried below code :

    describe('Right click', function () {
      it('test {Regression} {Sanity} {Sanity}', async function () {
        var EC = protractor.ExpectedConditions;
        await browser.get("https://www.onlinemictest.com/mouse-test/");
        let b=await browser.getProcessedConfig()
        var rightClickEle = await $('.webcam-2-icon_');
        await browser.actions().mouseMove(rightClickEle).perform();
        await browser.actions().click(protractor.Button.RIGHT).perform();
        await browser.sleep(7000)

But it's not doing right-click, its always going for left click. Could someone help me out here?

1 Answer 1



There is known bug

The work around is to disable w3c protocol in your config file:

capabilities: {
  'browserName': 'chrome' ,

'chromeOptions': {
w3c: false
//},//11 or 'safari'*/

For microsoft webdriver: (Edge)

Create a bat (say a.bat) file with below content (assuming the driver is in c)

C:\MicrosoftWebDriver.exe %* --jwp

Now pass this as the dge webdriver using jvmArgs

exports.config = {

specs: ['spec.js'],

localSeleniumStandaloneOpts: {
  jvmArgs: ['-Dwebdriver.edge.driver=a.bat'],

capabilities: {
  'browserName': 'MicrosoftEdge' ,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.