How to make protractor press the enter key?

后端 未结 6 1049
执笔经年
执笔经年 2020-12-15 15:09

I\'ve tried this:

browser.actions().keyDown(protractor.Key.ENTER).keyUp(protractor.Key.Enter).perform();

which gives the error:

<         


        
6条回答
  •  长情又很酷
    2020-12-15 15:28

    Here is another way of doing this

    var enter = browser.actions().sendKeys(protractor.Key.ENTER);
    enter.perform();
    

提交回复
热议问题