converter/e2e/app.po.ts

26 lines
578 B
TypeScript
Raw Normal View History

2017-04-15 19:04:49 +02:00
import {browser, by, element} from 'protractor';
2017-04-15 14:47:43 +02:00
export class ConvertorizrPage {
navigateTo() {
return browser.get('/');
}
2017-04-15 13:50:10 +02:00
public foo() {
2017-04-15 19:04:49 +02:00
return 'bar';
2017-04-15 13:50:10 +02:00
}
public getInputfieldContent(index: number): Promise<any> {
2017-04-15 19:04:49 +02:00
const css1 = by.css('app-root div.inputwrapper');
2017-04-15 13:50:10 +02:00
console.log(css1);
2017-04-15 19:04:49 +02:00
const el1 = element.all(css1)[index];
2017-04-15 13:50:10 +02:00
console.log(el1);
2017-04-15 19:04:49 +02:00
const css2 = by.css('.textwrapper textarea');
2017-04-15 13:50:10 +02:00
console.log(css2);
2017-04-15 19:04:49 +02:00
const el2 = el1.findElement(css2);
2017-04-15 13:50:10 +02:00
console.log(el2);
2017-04-15 19:04:49 +02:00
const t = el2.getText();
2017-04-15 13:50:10 +02:00
console.log(t);
return t;
}
}