-
Notifications
You must be signed in to change notification settings - Fork 14
/
element.js
79 lines (59 loc) · 1.86 KB
/
element.js
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
'use strict';
const BaseElement = require('./base-element');
class Element extends BaseElement {
async getElement() {
return await this._browser._findElement(this._selector, ...arguments);
}
async isEnabled() {
return await this._browser.isEnabled(this._selector, ...arguments);
}
async waitForEnabled() {
await this._browser.waitForEnabled(this._selector, ...arguments);
}
async waitForDisabled() {
await this._browser.waitForDisabled(this._selector, ...arguments);
}
async isDisplayed() {
return await this._browser.isDisplayed(this._selector, ...arguments);
}
async waitForVisible() {
await this._browser.waitForVisible(this._selector, ...arguments);
}
async waitForHidden() {
await this._browser.waitForHidden(this._selector, ...arguments);
}
async waitForText() {
await this._browser.waitForText(this._selector, ...arguments);
}
async scrollIntoView() {
await this._browser.scrollIntoView(this._selector, ...arguments);
}
async getText() {
return await this._browser.getText(this._selector, ...arguments);
}
async getValue() {
return await this._browser.getValue(this._selector, ...arguments);
}
async click() {
await this._browser.click(this._selector, ...arguments);
}
async setValue() {
await this._browser.setValue(this._selector, ...arguments);
}
async setPassword() {
await this._browser.setPassword(this._selector, ...arguments);
}
async sendKeys() {
await this._browser.elementSendKeys(this._selector, ...arguments);
}
async moveTo() {
await this._browser.moveTo(this._selector, ...arguments);
}
async getAttribute() {
return await this._browser.getAttribute(this._selector, ...arguments);
}
async selectByVisibleText() {
await this._browser.selectByVisibleText(this._selector, ...arguments);
}
}
module.exports = Element;