17 lines
No EOL
520 B
JavaScript
17 lines
No EOL
520 B
JavaScript
import {Selector,t} from 'testcafe';
|
|
|
|
export default class LoginPage{
|
|
constructor(){
|
|
this.mainPageURL='http://localhost:9000/';
|
|
this.email = Selector('[data-tc="email"]');
|
|
this.password = Selector('[data-tc="password"]');
|
|
this.submitButton = Selector('[data-tc="submit"]');
|
|
}
|
|
|
|
async performLogin(putEmail, putPassword){
|
|
await t
|
|
.typeText(this.email, putEmail)
|
|
.typeText(this.password, putPassword)
|
|
.click(this.submitButton);
|
|
}
|
|
} |