Protractor - does anybody know how to click on element with RIGHT MOUSE BUTTON?

georgw picture georgw · Mar 13, 2014 · Viewed 13k times · Source

I know that protractor click on element by default with left mouse button. How to do it to click with RIGHT MOUSE BUTTON ?

el.click('RIGHT'); ?

Answer

glepretre picture glepretre · Mar 17, 2014

I would have done like this:

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

Based on what I saw in actionsequence.js and Protractor rightClick issue #280