Matteo Scandolo | d3b57a1 | 2017-04-20 14:33:04 -0700 | [diff] [blame] | 1 | module.exports = new function(){ |
2 | |||||
3 | const usernameField = element(by.model('username')); | ||||
4 | const passwordField = element(by.model('password')); | ||||
5 | const submitBtn = element(by.css('.btn.btn-accent')); | ||||
6 | |||||
7 | this.sendUsername = (username) => { | ||||
8 | usernameField.sendKeys(username); | ||||
9 | }; | ||||
10 | |||||
11 | this.sendPassword = (pwd) => { | ||||
12 | passwordField.sendKeys(pwd); | ||||
13 | }; | ||||
14 | |||||
15 | this.submit = () => { | ||||
16 | submitBtn.click(); | ||||
17 | } | ||||
18 | }; |