How can I do a Ctrl+Click on protractor?(如何在量角器上按 Ctrl+单击?)
问题描述
我尝试了以下奇怪的组合,但它们都不起作用:
I have tried weird combination as the following, but none of them are working:
推荐答案
你需要链接 mouseMove()
, keyDown()
和 click():
You need to chain mouseMove()
, keyDown()
and click()
:
通过单击链接在 Chrome 上对其进行了测试 - 在新选项卡中打开一个链接.
Tested it on Chrome by clicking on a link - opens up a link in a new tab.
请注意,从 protractor 1.5 开始,应该使用全局 browser
对象代替 protractor.getInstance()
,请参阅 重大更改.
Note that, starting with protractor 1.5, there is a global browser
object that should be used instead of protractor.getInstance()
, see Breaking Changes.
这篇关于如何在量角器上按 Ctrl+单击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!