Created
August 8, 2014 16:16
-
-
Save PierrickP/095cd73dad49210b5767 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
browser.actions().mouseMove(element(by.css('#myElement'))).perform(); | |
browser.actions().click(protractor.Button.RIGHT).perform(); |
I used the above code but getting error "Failed: Cannot read property 'RIGHT' of undefined" on mouse right click.
var el = element.all(by.xpath("//*[text()[normalize-space() = '" + "Active" + "']]")).get(1);
el.click();
browser.sleep(3000);
browser.actions().mouseMove(el).perform();
browser.actions().click(protractor.Button.RIGHT).perform();
From the webdriverJs api, you can right click an element thusly:
browser.actions()
.click($('.myElm'), protractor.Button.RIGHT)
.perform();
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how to select the options after right clicking on an element.