Skip to content

Instantly share code, notes, and snippets.

@Aracturat
Created December 1, 2017 08:54
Show Gist options
  • Save Aracturat/5086b47d5fb884d75f0f4bd3ddd9bbd9 to your computer and use it in GitHub Desktop.
Save Aracturat/5086b47d5fb884d75f0f4bd3ddd9bbd9 to your computer and use it in GitHub Desktop.
export class Row extends BasePageObject {
@selector('#element')
public rowElement: Element;
public clickCheckboxes() { }
}
export class List extends BasePageObject {
@child(".row", Row)
public rows: Row[];
public refresh() { }
}
export class Filter extends BasePageObject {
@input('#filter1')
public filter1: string;
@selector('#filter1')
public filter2: Element;
public reset() { }
}
export class Page extends BasePageObject {
@child(".filter")
public filter: Filter;
@child(".list")
public list: List;
public waitAllLoaders() {}
}
var po = new Page(this.browser, { timeoutMs: 10000 });
po.list.element;
po.list.rows.forEach((e: Row) => {
e.rowElement.getText();
e.element.getText();
})
po.filter.element;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment