Protractor testing: How to set the value of text elements in a login form?

后端 未结 6 651
清酒与你
清酒与你 2020-12-15 02:42

I am writing tests in Protractor for an Angular app. I want to fill out a login form and submit it.

How can I do this? I have got this far, but I don\'t know how to

6条回答
  •  失恋的感觉
    2020-12-15 03:12

    How about xpath?

    I create a button like bellow:

    
    
    

    And set the value using

    element(by.xpath('//*[@name="password"]/input')).sendKeys('PASSWORD')
    

提交回复
热议问题