im trying to preform a right click using selenium, any thoughts on how to do this?
相关问题
- Selecting an item from a combo box selenium driver
- Selenium in Java is not finding element when using
- How to send text to the search field through Selen
- What is the difference in “find_element_by_xpath”
- Cloudflare and Chromedriver - cloudflare distingui
Please see docroots's answer for selenium.
To generally simulate a right click in JavaScript, have a look at JavaScript simulate right click through code.
I've tried ActionSequence and it worked.
ContextClick function is not found, you should use click.
So, it should be as follows:
The element is your web element, 2 means right click.
it appears that for my issue (an element that opens a popup after a right click), using selenium's : mouse_down_right() and then mouse_up_right() worked as well. thanks.
According to the
OpenQA.Selenium.Interactions
Namespace.Selenium is offering a method for right click - ContextClick: