This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
FoodLoop-Web/e2e/login.po.ts

21 lines
660 B
TypeScript
Raw Normal View History

import { browser, element, by } from 'protractor';
2017-08-25 10:55:53 +00:00
export class LoginPageObject {
navigateTo() {
return browser.get('/login');
}
getLoginHeaderText() {
return element(by.css('app-root h1')).getText();
}
getUsernameField() { return element(by.id('username')); }
getPasswordField() { return element(by.id('password')); }
isUsernameFieldPresent() { return this.getUsernameField().isPresent(); }
isPasswordFieldPresent() { return this.getPasswordField().isPresent(); }
getUsernameFieldType() { return this.getUsernameField().getAttribute('type'); }
getPasswordFieldType() { return this.getPasswordField().getAttribute('type'); }
}