简体   繁体   English

如何在node.js selenium-webdriver中模拟右键单击?

[英]How can I emulate right-click in the node.js selenium-webdriver?

I am using selenium-webdriver for nodejs . 我正在为selejs使用selenium-webdriver

How can I emulate a right-click with this driver? 如何使用此驱动程序模拟右键单击? I can't find this in the official documentation. 我在官方文档中找不到。

Thanks, wmash. 谢谢,哇 You help me found solution. 你帮我找到解决方案。

Answer (found here ): 答案(在此处找到):

driver.actions().click(element1, input.Button.RIGHT).perform();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 node.js selenium-webdriver 中打开一个新选项卡 - opening a new tab in node.js selenium-webdriver selenium-webdriver node.js:等待超时后如何处理缺少的元素(似乎无法捕获到异常) - selenium-webdriver node.js: how to handle missing element after wait timeout (exception can't seem to be caught) Selenium-Webdriver Node.js找不到新窗口 - Selenium-Webdriver Node.js Can't Find New Window 如何使用selenium-webdriver正确添加cookie? - How can I correctly add a cookie using selenium-webdriver? 如何在SauceLabs中使用selenium-webdriver包? - How can I use selenium-webdriver package with SauceLabs? setAttribute('display','block')不起作用selenium-webdriver节点js - setAttribute('display','block') not working selenium-webdriver node js 如何使用右键单击检测文本是否粘贴 - How can I detect if text is paste using right-click 如果使用Selenium-webdriver和Java在div中定义了SELECT列表,如何单击选项 - How can click an option if SELECT list is define in a div with Selenium-webdriver & Java Selenium-webdriver JS - 如何等待元素可见 - Selenium-webdriver JS - how to wait until an element is visible 我可以使用 selenium-webdriver 一次(同时)运行多个实例吗? - Can I run multiple instances at once(simultaneously) with selenium-webdriver?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM