question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

protractor.Button.RIGHT simulates a left click every time

See original GitHub issue

Currently in protractor version 5.4.2 there seems to be no way to simulate a mouse right click. The old version pre chromedriver 74 was to use browser.actions().click(elem, protractor.Button.RIGHT), but that always simulates a left click. No other method I attempted was able to reproduce a right.

Bug report

  • Node Version: 12.13.0
  • Protractor Version: 5.4.2
  • Angular Version: ``
  • Browser(s): chrome, version 79
  • Operating System and Version win 10

UPDATE: as @praveendvd mentioned bellow the solution is to add w3c: false to your browser capabilites capabilities: { browserName: ‘chrome’ , chromeOptions: { w3c: false } },

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
Fuun347commented, Mar 14, 2020

@praveendvd That completely fixed it! Thank you so much!

0reactions
praveendvdcommented, Mar 14, 2020

#5271

use

capabilities: { ‘browserName’: ‘chrome’ , ‘chromeOptions’: { w3c: false },// or ‘safari’ },

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Right click on specific element, with protractor?
How to simulate mouse Right click on given element ...
Read more >
Protractor Tutorial: Handle Mouse Actions & Keyboard Events
method simulates a double click of the mouse. Generally, when an element is double clicked it either activates the particular element or lifts...
Read more >
Protractor Tutorial: Handle Mouse Actions and Keyboard Events
method simulates a double click of the mouse. Generally, when an element is double clicked it either activates the particular element or lifts...
Read more >
Part-17: How To Handle Mouse Actions in Protractor - YouTube
Topics :------------1) How To Handle Mouse Actions in Protractor 2) Right Click or Context Click # protractor #rightclick ...
Read more >
Handling Different types of elements in protractor
We use click function to perform operations like clicking on button, clicking on links, Clicking on checkbox and radio button. Usage of click...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found