-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.d.ts
44 lines (36 loc) · 1.04 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
interface ElementDefinition {
alias: string,
selector: string|object,
selectorType?: string,
text?: string
}
interface ComponentDefinition extends ElementDefinition {
isCollection: boolean
}
export class State {
static setPageMap(pageMap: PageMap): void;
static setPage(pageName: string): void;
static getPage(): ProtractorPage|WebdriverIOPage|SeleniumPage;
}
export class Collection {
constructor(collection: ElementDefinition)
}
export class Element {
constructor(element: ElementDefinition)
}
export class Page {
defineElement(element: Element): void;
defineCollection(collection: Collection): void;
defineComponent(component: Component): void;
getElement(key: string): Object;
}
export class Component extends Page {
constructor(component: ComponentDefinition)
}
export class ProtractorPage extends Page {}
export class WebdriverIOPage extends Page {}
export class SeleniumPage extends Page {}
export class PageMap {
definePage(alias: string, selector: string|RegExp, pageObject: Page): void;
getPage(alias: string): Page;
}