admin管理员组文章数量:1312825
I'm trying to the 'protractor.Key.DELETE'
to make protractor press the delete key. Any thoughts on how to go about doing this? The following does not work for me:
browser.actions().keyDown(protractor.Key.DELETE).sendKeys().perform();
Protractor give me the following error message:
Failed: Not a modifier key
I'm trying to the 'protractor.Key.DELETE'
to make protractor press the delete key. Any thoughts on how to go about doing this? The following does not work for me:
browser.actions().keyDown(protractor.Key.DELETE).sendKeys().perform();
Protractor give me the following error message:
Failed: Not a modifier key
Share Improve this question edited Mar 11, 2015 at 19:50 Feras Salim 4387 silver badges33 bronze badges asked Mar 11, 2015 at 19:45 Joseph FreemanJoseph Freeman 1,7944 gold badges26 silver badges50 bronze badges 3- possible duplicate of How to make protractor press the enter key? – alecxe Commented Mar 11, 2015 at 22:05
- I've seen that post. Using an instance of Protractor doesn't seem to work for me. – Joseph Freeman Commented Mar 12, 2015 at 3:09
-
Okay, but what about
browser.actions().sendKeys(protractor.Key.ENTER).perform();
? – alecxe Commented Mar 12, 2015 at 3:10
1 Answer
Reset to default 9keyDown
can only work for modifier keys, such as Alt
, SHIFT
, CONTROL
.
To make protractor press the DELETE
key, you can use senKeys
like this:
browser.actions().sendKeys(protractor.Key.DELETE).perform();
本文标签: javascriptAngularjs Protractor Test protractorKeyDELETEis this a proper modifier keyStack Overflow
版权声明:本文标题:javascript - Angularjs Protractor Test: protractor.Key.DELETE......is this a proper modifier key? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741916159a2404744.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论