import { browser, by, element } from 'protractor'; export class AppPage { async navigateTo(): Promise { return browser.get(browser.baseUrl); } async setValue1(val : string) { const input = element(by.id('val1')); await input.clear() await input.sendKeys(val); } async setValue2(val : string) { const input = element(by.id('val2')); await input.clear() await input.sendKeys(val); } async getResult(): Promise { return element(by.id('result')).getText(); } async getMessage(): Promise { return element(by.id('message')).getText(); } async getTitleText(): Promise { return element(by.css('app-root .header h1')).getText(); } async clickAdd(): Promise { return element(by.id('add')).click() } async clickSubtract(): Promise { return element(by.id('subtract')).click() } async clickMultiply(): Promise { return element(by.id('multiply')).click() } async clickDivide(): Promise { return element(by.id('divide')).click() } }