Protractor - Does anyone know how to click on an item using the RIGHT MOUSE BUTTON?

I know that the protractor clicks on the default element with the left mouse button. How to do this by clicking the RIGHT MOUSE BUTTON?

el.click('RIGHT'); ?

+7
protractor mouse right-click
source share
3 answers

I would do this:

 browser.actions().mouseMove(el.find()).perform(); browser.actions().click(protractor.Button.RIGHT).perform(); 

Based on what I saw in actionsequence.js and the issues of human rights defender Protractor # 280

+16
source share

The decision made for this question is not the best way to do this. "Browser Actions" .click() takes an optional argument for right-clicking. Best solution, from webdriverJs api :

 browser.actions() .click($('.myElm'), protractor.Button.RIGHT) .perform(); 
+1
source share

Try the following:

el.sendKeys (protractor.Key.RIGHT)

Here is a list of keys: https://code.google.com/p/selenium/source/browse/javascript/webdriver/key.js

If this does not work, follow these steps: https://groups.google.com/forum/#!topic/selenium-users/fF_Hcp40KO0

Let me know if it works.

-one
source share

All Articles