sendKeys操作中有多个键

  • 本文关键字:操作 sendKeys dalekjs
  • 更新时间 :
  • 英文 :


我试图同时将多个密钥Cmd Alt P传递给Dalek以测试页面行为:

test
    .open('themes/ribbon/index.html')
    .sendKeys('body', 'uE03DuE00Au0050') // Cmd Alt P
    .assert.attr('body', 'class', 'full')
.done();

由于测试失败,它似乎不起作用。我使用W3C WebDriver规范作为密钥代码参考,但我还没有找到关于如何发送多个密钥的明确描述(在Dalek文档和规范中都有),尤其是使用常规而非特殊的密钥,如Alt和Cmd。

当然,只使用F5的相同测试效果良好:

test
    .open('themes/ribbon/index.html')
    .sendKeys('body', 'uE035') // F5
    .assert.attr('body', 'class', 'full')
.done();

经过一些测试,我得出结论,这与DalekJS中的一个错误有关,你能转到Github并在那里提交一个问题吗?!

谢谢。

最新更新