codeceptjs 3.5.12-beta.5 → 3.5.12-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/helper/MockServer.js +215 -0
- package/lib/helper/Playwright.js +43 -22
- package/lib/helper/Puppeteer.js +25 -6
- package/lib/helper/WebDriver.js +25 -4
- package/lib/helper/errors/ElementAssertion.js +38 -0
- package/package.json +6 -5
- package/typings/index.d.ts +16 -0
- package/typings/promiseBasedTypes.d.ts +182 -0
- package/typings/types.d.ts +182 -0
- package/docs/advanced.md +0 -351
- package/docs/ai.md +0 -248
- package/docs/api.md +0 -323
- package/docs/basics.md +0 -979
- package/docs/bdd.md +0 -539
- package/docs/best.md +0 -237
- package/docs/books.md +0 -37
- package/docs/bootstrap.md +0 -135
- package/docs/build/ApiDataFactory.js +0 -410
- package/docs/build/Appium.js +0 -2027
- package/docs/build/Expect.js +0 -422
- package/docs/build/FileSystem.js +0 -228
- package/docs/build/GraphQL.js +0 -229
- package/docs/build/GraphQLDataFactory.js +0 -309
- package/docs/build/JSONResponse.js +0 -338
- package/docs/build/Mochawesome.js +0 -71
- package/docs/build/Nightmare.js +0 -2152
- package/docs/build/OpenAI.js +0 -126
- package/docs/build/Playwright.js +0 -5110
- package/docs/build/Protractor.js +0 -2706
- package/docs/build/Puppeteer.js +0 -3905
- package/docs/build/REST.js +0 -344
- package/docs/build/TestCafe.js +0 -2125
- package/docs/build/WebDriver.js +0 -4240
- package/docs/changelog.md +0 -2572
- package/docs/commands.md +0 -266
- package/docs/community-helpers.md +0 -58
- package/docs/configuration.md +0 -157
- package/docs/continuous-integration.md +0 -22
- package/docs/custom-helpers.md +0 -306
- package/docs/data.md +0 -379
- package/docs/detox.md +0 -235
- package/docs/docker.md +0 -136
- package/docs/email.md +0 -183
- package/docs/examples.md +0 -149
- package/docs/helpers/ApiDataFactory.md +0 -266
- package/docs/helpers/Appium.md +0 -1374
- package/docs/helpers/Detox.md +0 -586
- package/docs/helpers/Expect.md +0 -275
- package/docs/helpers/FileSystem.md +0 -152
- package/docs/helpers/GraphQL.md +0 -151
- package/docs/helpers/GraphQLDataFactory.md +0 -226
- package/docs/helpers/JSONResponse.md +0 -254
- package/docs/helpers/Mochawesome.md +0 -8
- package/docs/helpers/MockRequest.md +0 -377
- package/docs/helpers/Nightmare.md +0 -1305
- package/docs/helpers/OpenAI.md +0 -70
- package/docs/helpers/Playwright.md +0 -2759
- package/docs/helpers/Polly.md +0 -44
- package/docs/helpers/Protractor.md +0 -1769
- package/docs/helpers/Puppeteer-firefox.md +0 -86
- package/docs/helpers/Puppeteer.md +0 -2317
- package/docs/helpers/REST.md +0 -218
- package/docs/helpers/TestCafe.md +0 -1321
- package/docs/helpers/WebDriver.md +0 -2547
- package/docs/hooks.md +0 -340
- package/docs/index.md +0 -111
- package/docs/installation.md +0 -75
- package/docs/internal-api.md +0 -266
- package/docs/locators.md +0 -339
- package/docs/mobile-react-native-locators.md +0 -67
- package/docs/mobile.md +0 -338
- package/docs/pageobjects.md +0 -291
- package/docs/parallel.md +0 -400
- package/docs/playwright.md +0 -632
- package/docs/plugins.md +0 -1259
- package/docs/puppeteer.md +0 -316
- package/docs/quickstart.md +0 -162
- package/docs/react.md +0 -70
- package/docs/reports.md +0 -392
- package/docs/secrets.md +0 -36
- package/docs/shadow.md +0 -68
- package/docs/shared/keys.mustache +0 -31
- package/docs/shared/react.mustache +0 -1
- package/docs/testcafe.md +0 -174
- package/docs/translation.md +0 -247
- package/docs/tutorial.md +0 -271
- package/docs/typescript.md +0 -180
- package/docs/ui.md +0 -59
- package/docs/videos.md +0 -28
- package/docs/visual.md +0 -202
- package/docs/vue.md +0 -143
- package/docs/webapi/amOnPage.mustache +0 -11
- package/docs/webapi/appendField.mustache +0 -11
- package/docs/webapi/attachFile.mustache +0 -12
- package/docs/webapi/blur.mustache +0 -18
- package/docs/webapi/checkOption.mustache +0 -13
- package/docs/webapi/clearCookie.mustache +0 -9
- package/docs/webapi/clearField.mustache +0 -9
- package/docs/webapi/click.mustache +0 -25
- package/docs/webapi/clickLink.mustache +0 -8
- package/docs/webapi/closeCurrentTab.mustache +0 -7
- package/docs/webapi/closeOtherTabs.mustache +0 -8
- package/docs/webapi/dontSee.mustache +0 -11
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +0 -10
- package/docs/webapi/dontSeeCookie.mustache +0 -8
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +0 -10
- package/docs/webapi/dontSeeElement.mustache +0 -8
- package/docs/webapi/dontSeeElementInDOM.mustache +0 -8
- package/docs/webapi/dontSeeInCurrentUrl.mustache +0 -4
- package/docs/webapi/dontSeeInField.mustache +0 -11
- package/docs/webapi/dontSeeInSource.mustache +0 -8
- package/docs/webapi/dontSeeInTitle.mustache +0 -8
- package/docs/webapi/doubleClick.mustache +0 -13
- package/docs/webapi/downloadFile.mustache +0 -12
- package/docs/webapi/dragAndDrop.mustache +0 -9
- package/docs/webapi/dragSlider.mustache +0 -11
- package/docs/webapi/executeAsyncScript.mustache +0 -24
- package/docs/webapi/executeScript.mustache +0 -26
- package/docs/webapi/fillField.mustache +0 -16
- package/docs/webapi/focus.mustache +0 -13
- package/docs/webapi/forceClick.mustache +0 -28
- package/docs/webapi/forceRightClick.mustache +0 -18
- package/docs/webapi/grabAllWindowHandles.mustache +0 -7
- package/docs/webapi/grabAttributeFrom.mustache +0 -10
- package/docs/webapi/grabAttributeFromAll.mustache +0 -9
- package/docs/webapi/grabBrowserLogs.mustache +0 -9
- package/docs/webapi/grabCookie.mustache +0 -11
- package/docs/webapi/grabCssPropertyFrom.mustache +0 -11
- package/docs/webapi/grabCssPropertyFromAll.mustache +0 -10
- package/docs/webapi/grabCurrentUrl.mustache +0 -9
- package/docs/webapi/grabCurrentWindowHandle.mustache +0 -6
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +0 -20
- package/docs/webapi/grabElementBoundingRect.mustache +0 -20
- package/docs/webapi/grabGeoLocation.mustache +0 -8
- package/docs/webapi/grabHTMLFrom.mustache +0 -10
- package/docs/webapi/grabHTMLFromAll.mustache +0 -9
- package/docs/webapi/grabNumberOfOpenTabs.mustache +0 -8
- package/docs/webapi/grabNumberOfVisibleElements.mustache +0 -9
- package/docs/webapi/grabPageScrollPosition.mustache +0 -8
- package/docs/webapi/grabPopupText.mustache +0 -5
- package/docs/webapi/grabSource.mustache +0 -8
- package/docs/webapi/grabTextFrom.mustache +0 -10
- package/docs/webapi/grabTextFromAll.mustache +0 -9
- package/docs/webapi/grabTitle.mustache +0 -8
- package/docs/webapi/grabValueFrom.mustache +0 -9
- package/docs/webapi/grabValueFromAll.mustache +0 -8
- package/docs/webapi/grabWebElement.mustache +0 -9
- package/docs/webapi/grabWebElements.mustache +0 -9
- package/docs/webapi/moveCursorTo.mustache +0 -12
- package/docs/webapi/openNewTab.mustache +0 -7
- package/docs/webapi/pressKey.mustache +0 -12
- package/docs/webapi/pressKeyDown.mustache +0 -12
- package/docs/webapi/pressKeyUp.mustache +0 -12
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +0 -60
- package/docs/webapi/refreshPage.mustache +0 -6
- package/docs/webapi/resizeWindow.mustache +0 -6
- package/docs/webapi/rightClick.mustache +0 -14
- package/docs/webapi/saveElementScreenshot.mustache +0 -10
- package/docs/webapi/saveScreenshot.mustache +0 -12
- package/docs/webapi/say.mustache +0 -10
- package/docs/webapi/scrollIntoView.mustache +0 -11
- package/docs/webapi/scrollPageToBottom.mustache +0 -6
- package/docs/webapi/scrollPageToTop.mustache +0 -6
- package/docs/webapi/scrollTo.mustache +0 -12
- package/docs/webapi/see.mustache +0 -11
- package/docs/webapi/seeAttributesOnElements.mustache +0 -9
- package/docs/webapi/seeCheckboxIsChecked.mustache +0 -10
- package/docs/webapi/seeCookie.mustache +0 -8
- package/docs/webapi/seeCssPropertiesOnElements.mustache +0 -9
- package/docs/webapi/seeCurrentUrlEquals.mustache +0 -11
- package/docs/webapi/seeElement.mustache +0 -8
- package/docs/webapi/seeElementInDOM.mustache +0 -8
- package/docs/webapi/seeInCurrentUrl.mustache +0 -8
- package/docs/webapi/seeInField.mustache +0 -12
- package/docs/webapi/seeInPopup.mustache +0 -8
- package/docs/webapi/seeInSource.mustache +0 -7
- package/docs/webapi/seeInTitle.mustache +0 -8
- package/docs/webapi/seeNumberOfElements.mustache +0 -11
- package/docs/webapi/seeNumberOfVisibleElements.mustache +0 -10
- package/docs/webapi/seeTextEquals.mustache +0 -9
- package/docs/webapi/seeTitleEquals.mustache +0 -8
- package/docs/webapi/selectOption.mustache +0 -21
- package/docs/webapi/setCookie.mustache +0 -16
- package/docs/webapi/setGeoLocation.mustache +0 -12
- package/docs/webapi/switchTo.mustache +0 -9
- package/docs/webapi/switchToNextTab.mustache +0 -10
- package/docs/webapi/switchToPreviousTab.mustache +0 -10
- package/docs/webapi/type.mustache +0 -21
- package/docs/webapi/uncheckOption.mustache +0 -13
- package/docs/webapi/wait.mustache +0 -8
- package/docs/webapi/waitForClickable.mustache +0 -11
- package/docs/webapi/waitForDetached.mustache +0 -10
- package/docs/webapi/waitForElement.mustache +0 -11
- package/docs/webapi/waitForEnabled.mustache +0 -6
- package/docs/webapi/waitForFunction.mustache +0 -17
- package/docs/webapi/waitForInvisible.mustache +0 -10
- package/docs/webapi/waitForNumberOfTabs.mustache +0 -9
- package/docs/webapi/waitForText.mustache +0 -13
- package/docs/webapi/waitForValue.mustache +0 -10
- package/docs/webapi/waitForVisible.mustache +0 -10
- package/docs/webapi/waitInUrl.mustache +0 -9
- package/docs/webapi/waitNumberOfVisibleElements.mustache +0 -10
- package/docs/webapi/waitToHide.mustache +0 -10
- package/docs/webapi/waitUrlEquals.mustache +0 -10
- package/docs/webdriver.md +0 -701
- package/docs/wiki/Books-&-Posts.md +0 -27
- package/docs/wiki/Community-Helpers-&-Plugins.md +0 -53
- package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +0 -61
- package/docs/wiki/Examples.md +0 -145
- package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +0 -68
- package/docs/wiki/Home.md +0 -16
- package/docs/wiki/Migration-to-Appium-v2---CodeceptJS.md +0 -83
- package/docs/wiki/Release-Process.md +0 -24
- package/docs/wiki/Roadmap.md +0 -23
- package/docs/wiki/Tests.md +0 -1393
- package/docs/wiki/Upgrading-to-CodeceptJS-3.md +0 -153
- package/docs/wiki/Videos.md +0 -19
|
@@ -1,1769 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
permalink: /helpers/Protractor
|
|
3
|
-
editLink: false
|
|
4
|
-
sidebar: auto
|
|
5
|
-
title: Protractor
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|
|
9
|
-
|
|
10
|
-
## Protractor
|
|
11
|
-
|
|
12
|
-
**Extends Helper**
|
|
13
|
-
|
|
14
|
-
Protractor helper is based on [Protractor library][1] and used for testing web applications.
|
|
15
|
-
|
|
16
|
-
Protractor requires [Selenium Server and ChromeDriver/GeckoDriver to be installed][2].
|
|
17
|
-
To test non-Angular applications please make sure you have `angular: false` in configuration file.
|
|
18
|
-
|
|
19
|
-
### Configuration
|
|
20
|
-
|
|
21
|
-
This helper should be configured in codecept.conf.ts or codecept.conf.js
|
|
22
|
-
|
|
23
|
-
- `url` - base url of website to be tested
|
|
24
|
-
- `browser` - browser in which perform testing
|
|
25
|
-
- `angular` : disable this option to run tests for non-Angular applications.
|
|
26
|
-
- `driver` - which protractor driver to use (local, direct, session, hosted, sauce, browserstack). By default set to 'hosted' which requires selenium server to be started.
|
|
27
|
-
- `restart` - restart browser between tests.
|
|
28
|
-
- `smartWait`: (optional) **enables [SmartWait][3]**; wait for additional milliseconds for element to appear. Enable for 5 secs: "smartWait": 5000
|
|
29
|
-
- `disableScreenshots` - don't save screenshot on failure
|
|
30
|
-
- `fullPageScreenshots` - make full page screenshots on failure.
|
|
31
|
-
- `uniqueScreenshotNames` - option to prevent screenshot override if you have scenarios with the same name in different suites
|
|
32
|
-
- `keepBrowserState` - keep browser state between tests when `restart` set to false.
|
|
33
|
-
- `seleniumAddress` - Selenium address to connect (default: [http://localhost:4444/wd/hub][4])
|
|
34
|
-
- `rootElement` - Root element of AngularJS application (default: body)
|
|
35
|
-
- `getPageTimeout` (optional) sets default timeout for a page to be loaded. 10000 by default.
|
|
36
|
-
- `waitForTimeout`: (optional) sets default wait time in _ms_ for all `wait*` functions. 1000 by default.
|
|
37
|
-
- `scriptsTimeout`: (optional) timeout in milliseconds for each script run on the browser, 10000 by default.
|
|
38
|
-
- `windowSize`: (optional) default window size. Set to `maximize` or a dimension in the format `640x480`.
|
|
39
|
-
- `manualStart` - do not start browser before a test, start it manually inside a helper with `this.helpers.WebDriver._startBrowser()`
|
|
40
|
-
- `capabilities`: {} - list of [Desired Capabilities][5]
|
|
41
|
-
- `proxy`: set proxy settings
|
|
42
|
-
|
|
43
|
-
other options are the same as in [Protractor config][6].
|
|
44
|
-
|
|
45
|
-
#### Sample Config
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"helpers": {
|
|
50
|
-
"Protractor" : {
|
|
51
|
-
"url": "http://localhost",
|
|
52
|
-
"browser": "chrome",
|
|
53
|
-
"smartWait": 5000,
|
|
54
|
-
"restart": false
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
#### Config for Non-Angular application:
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"helpers": {
|
|
65
|
-
"Protractor" : {
|
|
66
|
-
"url": "http://localhost",
|
|
67
|
-
"browser": "chrome",
|
|
68
|
-
"angular": false
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
#### Config for Headless Chrome
|
|
75
|
-
|
|
76
|
-
```json
|
|
77
|
-
{
|
|
78
|
-
"helpers": {
|
|
79
|
-
"Protractor" : {
|
|
80
|
-
"url": "http://localhost",
|
|
81
|
-
"browser": "chrome",
|
|
82
|
-
"capabilities": {
|
|
83
|
-
"chromeOptions": {
|
|
84
|
-
"args": [ "--headless", "--disable-gpu", "--no-sandbox" ]
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Access From Helpers
|
|
93
|
-
|
|
94
|
-
Receive a WebDriverIO client from a custom helper by accessing `browser` property:
|
|
95
|
-
|
|
96
|
-
```js
|
|
97
|
-
this.helpers['Protractor'].browser
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Methods
|
|
101
|
-
|
|
102
|
-
### Parameters
|
|
103
|
-
|
|
104
|
-
- `config`
|
|
105
|
-
|
|
106
|
-
### _getWindowHandle
|
|
107
|
-
|
|
108
|
-
Get the window handle relative to the current handle. i.e. the next handle or the previous.
|
|
109
|
-
|
|
110
|
-
#### Parameters
|
|
111
|
-
|
|
112
|
-
- `offset` **[Number][7]** Offset from current handle index. i.e. offset < 0 will go to the previous handle and positive number will go to the next window handle in sequence.
|
|
113
|
-
|
|
114
|
-
### _locate
|
|
115
|
-
|
|
116
|
-
Get elements by different locator types, including strict locator
|
|
117
|
-
Should be used in custom helpers:
|
|
118
|
-
|
|
119
|
-
```js
|
|
120
|
-
this.helpers['Protractor']._locate({name: 'password'}).then //...
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
To use SmartWait and wait for element to appear on a page, add `true` as second arg:
|
|
124
|
-
|
|
125
|
-
```js
|
|
126
|
-
this.helpers['Protractor']._locate({name: 'password'}, true).then //...
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
#### Parameters
|
|
130
|
-
|
|
131
|
-
- `locator`
|
|
132
|
-
- `smartWait`
|
|
133
|
-
|
|
134
|
-
### _locateCheckable
|
|
135
|
-
|
|
136
|
-
Find a checkbox by providing human readable text:
|
|
137
|
-
|
|
138
|
-
```js
|
|
139
|
-
this.helpers['Protractor']._locateCheckable('I agree with terms and conditions').then // ...
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
#### Parameters
|
|
143
|
-
|
|
144
|
-
- `locator`
|
|
145
|
-
|
|
146
|
-
### _locateClickable
|
|
147
|
-
|
|
148
|
-
Find a clickable element by providing human readable text:
|
|
149
|
-
|
|
150
|
-
```js
|
|
151
|
-
this.helpers['Protractor']._locateClickable('Next page').then // ...
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
#### Parameters
|
|
155
|
-
|
|
156
|
-
- `locator`
|
|
157
|
-
|
|
158
|
-
### _locateFields
|
|
159
|
-
|
|
160
|
-
Find field elements by providing human readable text:
|
|
161
|
-
|
|
162
|
-
```js
|
|
163
|
-
this.helpers['Protractor']._locateFields('Your email').then // ...
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
#### Parameters
|
|
167
|
-
|
|
168
|
-
- `locator`
|
|
169
|
-
|
|
170
|
-
### acceptPopup
|
|
171
|
-
|
|
172
|
-
Accepts the active JavaScript native popup window, as created by window.alert|window.confirm|window.prompt.
|
|
173
|
-
Don't confuse popups with modal windows, as created by [various
|
|
174
|
-
libraries][8]. Appium: support only web testing
|
|
175
|
-
|
|
176
|
-
### amInsideAngularApp
|
|
177
|
-
|
|
178
|
-
Enters Angular mode (switched on by default)
|
|
179
|
-
Should be used after "amOutsideAngularApp"
|
|
180
|
-
|
|
181
|
-
### amOnPage
|
|
182
|
-
|
|
183
|
-
Opens a web page in a browser. Requires relative or absolute url.
|
|
184
|
-
If url starts with `/`, opens a web page of a site defined in `url` config parameter.
|
|
185
|
-
|
|
186
|
-
```js
|
|
187
|
-
I.amOnPage('/'); // opens main page of website
|
|
188
|
-
I.amOnPage('https://github.com'); // opens github
|
|
189
|
-
I.amOnPage('/login'); // opens a login page
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
#### Parameters
|
|
193
|
-
|
|
194
|
-
- `url` **[string][9]** url path or global url.
|
|
195
|
-
|
|
196
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
197
|
-
|
|
198
|
-
### amOutsideAngularApp
|
|
199
|
-
|
|
200
|
-
Switch to non-Angular mode,
|
|
201
|
-
start using WebDriver instead of Protractor in this session
|
|
202
|
-
|
|
203
|
-
### appendField
|
|
204
|
-
|
|
205
|
-
Appends text to a input field or textarea.
|
|
206
|
-
Field is located by name, label, CSS or XPath
|
|
207
|
-
|
|
208
|
-
```js
|
|
209
|
-
I.appendField('#myTextField', 'appended');
|
|
210
|
-
// typing secret
|
|
211
|
-
I.appendField('password', secret('123456'));
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
#### Parameters
|
|
215
|
-
|
|
216
|
-
- `field` **([string][9] | [object][10])** located by label|name|CSS|XPath|strict locator
|
|
217
|
-
- `value` **[string][9]** text value to append.
|
|
218
|
-
|
|
219
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
220
|
-
|
|
221
|
-
### attachFile
|
|
222
|
-
|
|
223
|
-
Attaches a file to element located by label, name, CSS or XPath
|
|
224
|
-
Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
225
|
-
File will be uploaded to remote system (if tests are running remotely).
|
|
226
|
-
|
|
227
|
-
```js
|
|
228
|
-
I.attachFile('Avatar', 'data/avatar.jpg');
|
|
229
|
-
I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
#### Parameters
|
|
233
|
-
|
|
234
|
-
- `locator` **([string][9] | [object][10])** field located by label|name|CSS|XPath|strict locator.
|
|
235
|
-
- `pathToFile` **[string][9]** local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
236
|
-
|
|
237
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
238
|
-
|
|
239
|
-
### cancelPopup
|
|
240
|
-
|
|
241
|
-
Dismisses the active JavaScript popup, as created by window.alert|window.confirm|window.prompt.
|
|
242
|
-
|
|
243
|
-
### checkOption
|
|
244
|
-
|
|
245
|
-
Selects a checkbox or radio button.
|
|
246
|
-
Element is located by label or name or CSS or XPath.
|
|
247
|
-
|
|
248
|
-
The second parameter is a context (CSS or XPath locator) to narrow the search.
|
|
249
|
-
|
|
250
|
-
```js
|
|
251
|
-
I.checkOption('#agree');
|
|
252
|
-
I.checkOption('I Agree to Terms and Conditions');
|
|
253
|
-
I.checkOption('agree', '//form');
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
#### Parameters
|
|
257
|
-
|
|
258
|
-
- `field` **([string][9] | [object][10])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
259
|
-
- `context` **([string][9]? | [object][10])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
260
|
-
|
|
261
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
262
|
-
|
|
263
|
-
### clearCookie
|
|
264
|
-
|
|
265
|
-
Clears a cookie by name,
|
|
266
|
-
if none provided clears all cookies.
|
|
267
|
-
|
|
268
|
-
```js
|
|
269
|
-
I.clearCookie();
|
|
270
|
-
I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
#### Parameters
|
|
274
|
-
|
|
275
|
-
- `cookie` **[string][9]?** (optional, `null` by default) cookie name
|
|
276
|
-
|
|
277
|
-
### clearField
|
|
278
|
-
|
|
279
|
-
Clears a `<textarea>` or text `<input>` element's value.
|
|
280
|
-
|
|
281
|
-
```js
|
|
282
|
-
I.clearField('Email');
|
|
283
|
-
I.clearField('user[email]');
|
|
284
|
-
I.clearField('#email');
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
#### Parameters
|
|
288
|
-
|
|
289
|
-
- `field`
|
|
290
|
-
- `editable` **([string][9] | [object][10])** field located by label|name|CSS|XPath|strict locator.
|
|
291
|
-
|
|
292
|
-
Returns **void** automatically synchronized promise through #recorder.
|
|
293
|
-
|
|
294
|
-
### click
|
|
295
|
-
|
|
296
|
-
Perform a click on a link or a button, given by a locator.
|
|
297
|
-
If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
298
|
-
For buttons, the "value" attribute, "name" attribute, and inner text are searched. For links, the link text is searched.
|
|
299
|
-
For images, the "alt" attribute and inner text of any parent links are searched.
|
|
300
|
-
|
|
301
|
-
The second parameter is a context (CSS or XPath locator) to narrow the search.
|
|
302
|
-
|
|
303
|
-
```js
|
|
304
|
-
// simple link
|
|
305
|
-
I.click('Logout');
|
|
306
|
-
// button of form
|
|
307
|
-
I.click('Submit');
|
|
308
|
-
// CSS button
|
|
309
|
-
I.click('#form input[type=submit]');
|
|
310
|
-
// XPath
|
|
311
|
-
I.click('//form/*[@type=submit]');
|
|
312
|
-
// link in context
|
|
313
|
-
I.click('Logout', '#nav');
|
|
314
|
-
// using strict locator
|
|
315
|
-
I.click({css: 'nav a.login'});
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
#### Parameters
|
|
319
|
-
|
|
320
|
-
- `locator` **([string][9] | [object][10])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
321
|
-
- `context` **([string][9]? | [object][10] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
322
|
-
|
|
323
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
324
|
-
|
|
325
|
-
### closeCurrentTab
|
|
326
|
-
|
|
327
|
-
Close current tab
|
|
328
|
-
|
|
329
|
-
```js
|
|
330
|
-
I.closeCurrentTab();
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
### closeOtherTabs
|
|
334
|
-
|
|
335
|
-
Close all tabs except for the current one.
|
|
336
|
-
|
|
337
|
-
```js
|
|
338
|
-
I.closeOtherTabs();
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
### dontSee
|
|
342
|
-
|
|
343
|
-
Opposite to `see`. Checks that a text is not present on a page.
|
|
344
|
-
Use context parameter to narrow down the search.
|
|
345
|
-
|
|
346
|
-
```js
|
|
347
|
-
I.dontSee('Login'); // assume we are already logged in.
|
|
348
|
-
I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
#### Parameters
|
|
352
|
-
|
|
353
|
-
- `text` **[string][9]** which is not present.
|
|
354
|
-
- `context` **([string][9] | [object][10])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
355
|
-
|
|
356
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
357
|
-
|
|
358
|
-
### dontSeeCheckboxIsChecked
|
|
359
|
-
|
|
360
|
-
Verifies that the specified checkbox is not checked.
|
|
361
|
-
|
|
362
|
-
```js
|
|
363
|
-
I.dontSeeCheckboxIsChecked('#agree'); // located by ID
|
|
364
|
-
I.dontSeeCheckboxIsChecked('I agree to terms'); // located by label
|
|
365
|
-
I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
#### Parameters
|
|
369
|
-
|
|
370
|
-
- `field` **([string][9] | [object][10])** located by label|name|CSS|XPath|strict locator.
|
|
371
|
-
|
|
372
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
373
|
-
|
|
374
|
-
### dontSeeCookie
|
|
375
|
-
|
|
376
|
-
Checks that cookie with given name does not exist.
|
|
377
|
-
|
|
378
|
-
```js
|
|
379
|
-
I.dontSeeCookie('auth'); // no auth cookie
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
#### Parameters
|
|
383
|
-
|
|
384
|
-
- `name` **[string][9]** cookie name.
|
|
385
|
-
|
|
386
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
387
|
-
|
|
388
|
-
### dontSeeCurrentUrlEquals
|
|
389
|
-
|
|
390
|
-
Checks that current url is not equal to provided one.
|
|
391
|
-
If a relative url provided, a configured url will be prepended to it.
|
|
392
|
-
|
|
393
|
-
```js
|
|
394
|
-
I.dontSeeCurrentUrlEquals('/login'); // relative url are ok
|
|
395
|
-
I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
#### Parameters
|
|
399
|
-
|
|
400
|
-
- `url` **[string][9]** value to check.
|
|
401
|
-
|
|
402
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
403
|
-
|
|
404
|
-
### dontSeeElement
|
|
405
|
-
|
|
406
|
-
Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
407
|
-
|
|
408
|
-
```js
|
|
409
|
-
I.dontSeeElement('.modal'); // modal is not shown
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
#### Parameters
|
|
413
|
-
|
|
414
|
-
- `locator` **([string][9] | [object][10])** located by CSS|XPath|Strict locator.
|
|
415
|
-
|
|
416
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
417
|
-
|
|
418
|
-
### dontSeeElementInDOM
|
|
419
|
-
|
|
420
|
-
Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
421
|
-
|
|
422
|
-
```js
|
|
423
|
-
I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
#### Parameters
|
|
427
|
-
|
|
428
|
-
- `locator` **([string][9] | [object][10])** located by CSS|XPath|Strict locator.
|
|
429
|
-
|
|
430
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
431
|
-
|
|
432
|
-
### dontSeeInCurrentUrl
|
|
433
|
-
|
|
434
|
-
Checks that current url does not contain a provided fragment.
|
|
435
|
-
|
|
436
|
-
#### Parameters
|
|
437
|
-
|
|
438
|
-
- `url` **[string][9]** value to check.
|
|
439
|
-
|
|
440
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
441
|
-
|
|
442
|
-
### dontSeeInField
|
|
443
|
-
|
|
444
|
-
Checks that value of input field or textarea doesn't equal to given value
|
|
445
|
-
Opposite to `seeInField`.
|
|
446
|
-
|
|
447
|
-
```js
|
|
448
|
-
I.dontSeeInField('email', 'user@user.com'); // field by name
|
|
449
|
-
I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
450
|
-
```
|
|
451
|
-
|
|
452
|
-
#### Parameters
|
|
453
|
-
|
|
454
|
-
- `field` **([string][9] | [object][10])** located by label|name|CSS|XPath|strict locator.
|
|
455
|
-
- `value` **([string][9] | [object][10])** value to check.
|
|
456
|
-
|
|
457
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
458
|
-
|
|
459
|
-
### dontSeeInSource
|
|
460
|
-
|
|
461
|
-
Checks that the current page does not contains the given string in its raw source code.
|
|
462
|
-
|
|
463
|
-
```js
|
|
464
|
-
I.dontSeeInSource('<!--'); // no comments in source
|
|
465
|
-
```
|
|
466
|
-
|
|
467
|
-
#### Parameters
|
|
468
|
-
|
|
469
|
-
- `text`
|
|
470
|
-
- `value` **[string][9]** to check.
|
|
471
|
-
|
|
472
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
473
|
-
|
|
474
|
-
### dontSeeInTitle
|
|
475
|
-
|
|
476
|
-
Checks that title does not contain text.
|
|
477
|
-
|
|
478
|
-
```js
|
|
479
|
-
I.dontSeeInTitle('Error');
|
|
480
|
-
```
|
|
481
|
-
|
|
482
|
-
#### Parameters
|
|
483
|
-
|
|
484
|
-
- `text` **[string][9]** value to check.
|
|
485
|
-
|
|
486
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
487
|
-
|
|
488
|
-
### doubleClick
|
|
489
|
-
|
|
490
|
-
Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
491
|
-
Context can be specified as second parameter to narrow search.
|
|
492
|
-
|
|
493
|
-
```js
|
|
494
|
-
I.doubleClick('Edit');
|
|
495
|
-
I.doubleClick('Edit', '.actions');
|
|
496
|
-
I.doubleClick({css: 'button.accept'});
|
|
497
|
-
I.doubleClick('.btn.edit');
|
|
498
|
-
```
|
|
499
|
-
|
|
500
|
-
#### Parameters
|
|
501
|
-
|
|
502
|
-
- `locator` **([string][9] | [object][10])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
503
|
-
- `context` **([string][9]? | [object][10])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
504
|
-
|
|
505
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
506
|
-
|
|
507
|
-
### dragAndDrop
|
|
508
|
-
|
|
509
|
-
Drag an item to a destination element.
|
|
510
|
-
|
|
511
|
-
```js
|
|
512
|
-
I.dragAndDrop('#dragHandle', '#container');
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
#### Parameters
|
|
516
|
-
|
|
517
|
-
- `srcElement` **([string][9] | [object][10])** located by CSS|XPath|strict locator.
|
|
518
|
-
- `destElement` **([string][9] | [object][10])** located by CSS|XPath|strict locator.
|
|
519
|
-
|
|
520
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
521
|
-
|
|
522
|
-
### executeAsyncScript
|
|
523
|
-
|
|
524
|
-
Executes async script on page.
|
|
525
|
-
Provided function should execute a passed callback (as first argument) to signal it is finished.
|
|
526
|
-
|
|
527
|
-
Example: In Vue.js to make components completely rendered we are waiting for [nextTick][11].
|
|
528
|
-
|
|
529
|
-
```js
|
|
530
|
-
I.executeAsyncScript(function(done) {
|
|
531
|
-
Vue.nextTick(done); // waiting for next tick
|
|
532
|
-
});
|
|
533
|
-
```
|
|
534
|
-
|
|
535
|
-
By passing value to `done()` function you can return values.
|
|
536
|
-
Additional arguments can be passed as well, while `done` function is always last parameter in arguments list.
|
|
537
|
-
|
|
538
|
-
```js
|
|
539
|
-
let val = await I.executeAsyncScript(function(url, done) {
|
|
540
|
-
// in browser context
|
|
541
|
-
$.ajax(url, { success: (data) => done(data); }
|
|
542
|
-
}, 'http://ajax.callback.url/');
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
#### Parameters
|
|
546
|
-
|
|
547
|
-
- `fn` **([string][9] | [function][12])** function to be executed in browser context.
|
|
548
|
-
- `args` **...any** to be passed to function.
|
|
549
|
-
|
|
550
|
-
Returns **[Promise][13]<any>** script return value
|
|
551
|
-
|
|
552
|
-
### executeScript
|
|
553
|
-
|
|
554
|
-
Executes sync script on a page.
|
|
555
|
-
Pass arguments to function as additional parameters.
|
|
556
|
-
Will return execution result to a test.
|
|
557
|
-
In this case you should use async function and await to receive results.
|
|
558
|
-
|
|
559
|
-
Example with jQuery DatePicker:
|
|
560
|
-
|
|
561
|
-
```js
|
|
562
|
-
// change date of jQuery DatePicker
|
|
563
|
-
I.executeScript(function() {
|
|
564
|
-
// now we are inside browser context
|
|
565
|
-
$('date').datetimepicker('setDate', new Date());
|
|
566
|
-
});
|
|
567
|
-
```
|
|
568
|
-
|
|
569
|
-
Can return values. Don't forget to use `await` to get them.
|
|
570
|
-
|
|
571
|
-
```js
|
|
572
|
-
let date = await I.executeScript(function(el) {
|
|
573
|
-
// only basic types can be returned
|
|
574
|
-
return $(el).datetimepicker('getDate').toString();
|
|
575
|
-
}, '#date'); // passing jquery selector
|
|
576
|
-
```
|
|
577
|
-
|
|
578
|
-
#### Parameters
|
|
579
|
-
|
|
580
|
-
- `fn` **([string][9] | [function][12])** function to be executed in browser context.
|
|
581
|
-
- `args` **...any** to be passed to function.
|
|
582
|
-
|
|
583
|
-
Returns **[Promise][13]<any>** script return value
|
|
584
|
-
|
|
585
|
-
### fillField
|
|
586
|
-
|
|
587
|
-
Fills a text field or textarea, after clearing its value, with the given string.
|
|
588
|
-
Field is located by name, label, CSS, or XPath.
|
|
589
|
-
|
|
590
|
-
```js
|
|
591
|
-
// by label
|
|
592
|
-
I.fillField('Email', 'hello@world.com');
|
|
593
|
-
// by name
|
|
594
|
-
I.fillField('password', secret('123456'));
|
|
595
|
-
// by CSS
|
|
596
|
-
I.fillField('form#login input[name=username]', 'John');
|
|
597
|
-
// or by strict locator
|
|
598
|
-
I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
599
|
-
```
|
|
600
|
-
|
|
601
|
-
#### Parameters
|
|
602
|
-
|
|
603
|
-
- `field` **([string][9] | [object][10])** located by label|name|CSS|XPath|strict locator.
|
|
604
|
-
- `value` **([string][9] | [object][10])** text value to fill.
|
|
605
|
-
|
|
606
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
607
|
-
|
|
608
|
-
### grabAttributeFrom
|
|
609
|
-
|
|
610
|
-
Retrieves an attribute from an element located by CSS or XPath and returns it to test.
|
|
611
|
-
Resumes test execution, so **should be used inside async with `await`** operator.
|
|
612
|
-
If more than one element is found - attribute of first element is returned.
|
|
613
|
-
|
|
614
|
-
```js
|
|
615
|
-
let hint = await I.grabAttributeFrom('#tooltip', 'title');
|
|
616
|
-
```
|
|
617
|
-
|
|
618
|
-
#### Parameters
|
|
619
|
-
|
|
620
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
621
|
-
- `attr` **[string][9]** attribute name.
|
|
622
|
-
|
|
623
|
-
Returns **[Promise][13]<[string][9]>** attribute value
|
|
624
|
-
|
|
625
|
-
### grabAttributeFromAll
|
|
626
|
-
|
|
627
|
-
Retrieves an array of attributes from elements located by CSS or XPath and returns it to test.
|
|
628
|
-
Resumes test execution, so **should be used inside async with `await`** operator.
|
|
629
|
-
|
|
630
|
-
```js
|
|
631
|
-
let hints = await I.grabAttributeFromAll('.tooltip', 'title');
|
|
632
|
-
```
|
|
633
|
-
|
|
634
|
-
#### Parameters
|
|
635
|
-
|
|
636
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
637
|
-
- `attr` **[string][9]** attribute name.
|
|
638
|
-
|
|
639
|
-
Returns **[Promise][13]<[Array][14]<[string][9]>>** attribute value
|
|
640
|
-
|
|
641
|
-
### grabBrowserLogs
|
|
642
|
-
|
|
643
|
-
Get JS log from browser. Log buffer is reset after each request.
|
|
644
|
-
Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
645
|
-
|
|
646
|
-
```js
|
|
647
|
-
let logs = await I.grabBrowserLogs();
|
|
648
|
-
console.log(JSON.stringify(logs))
|
|
649
|
-
```
|
|
650
|
-
|
|
651
|
-
Returns **([Promise][13]<[Array][14]<[object][10]>> | [undefined][15])** all browser logs
|
|
652
|
-
|
|
653
|
-
### grabCookie
|
|
654
|
-
|
|
655
|
-
Gets a cookie object by name.
|
|
656
|
-
If none provided gets all cookies.
|
|
657
|
-
Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
658
|
-
|
|
659
|
-
```js
|
|
660
|
-
let cookie = await I.grabCookie('auth');
|
|
661
|
-
assert(cookie.value, '123456');
|
|
662
|
-
```
|
|
663
|
-
|
|
664
|
-
#### Parameters
|
|
665
|
-
|
|
666
|
-
- `name` **[string][9]?** cookie name.
|
|
667
|
-
|
|
668
|
-
Returns **any** attribute valueReturns cookie in JSON [format][16].
|
|
669
|
-
|
|
670
|
-
### grabCssPropertyFrom
|
|
671
|
-
|
|
672
|
-
Grab CSS property for given locator
|
|
673
|
-
Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
674
|
-
If more than one element is found - value of first element is returned.
|
|
675
|
-
|
|
676
|
-
```js
|
|
677
|
-
const value = await I.grabCssPropertyFrom('h3', 'font-weight');
|
|
678
|
-
```
|
|
679
|
-
|
|
680
|
-
#### Parameters
|
|
681
|
-
|
|
682
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
683
|
-
- `cssProperty` **[string][9]** CSS property name.
|
|
684
|
-
|
|
685
|
-
Returns **[Promise][13]<[string][9]>** CSS value
|
|
686
|
-
|
|
687
|
-
### grabCssPropertyFromAll
|
|
688
|
-
|
|
689
|
-
Grab array of CSS properties for given locator
|
|
690
|
-
Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
691
|
-
|
|
692
|
-
```js
|
|
693
|
-
const values = await I.grabCssPropertyFromAll('h3', 'font-weight');
|
|
694
|
-
```
|
|
695
|
-
|
|
696
|
-
#### Parameters
|
|
697
|
-
|
|
698
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
699
|
-
- `cssProperty` **[string][9]** CSS property name.
|
|
700
|
-
|
|
701
|
-
Returns **[Promise][13]<[Array][14]<[string][9]>>** CSS value
|
|
702
|
-
|
|
703
|
-
### grabCurrentUrl
|
|
704
|
-
|
|
705
|
-
Get current URL from browser.
|
|
706
|
-
Resumes test execution, so should be used inside an async function.
|
|
707
|
-
|
|
708
|
-
```js
|
|
709
|
-
let url = await I.grabCurrentUrl();
|
|
710
|
-
console.log(`Current URL is [${url}]`);
|
|
711
|
-
```
|
|
712
|
-
|
|
713
|
-
Returns **[Promise][13]<[string][9]>** current URL
|
|
714
|
-
|
|
715
|
-
### grabHTMLFrom
|
|
716
|
-
|
|
717
|
-
Retrieves the innerHTML from an element located by CSS or XPath and returns it to test.
|
|
718
|
-
Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
719
|
-
If more than one element is found - HTML of first element is returned.
|
|
720
|
-
|
|
721
|
-
```js
|
|
722
|
-
let postHTML = await I.grabHTMLFrom('#post');
|
|
723
|
-
```
|
|
724
|
-
|
|
725
|
-
#### Parameters
|
|
726
|
-
|
|
727
|
-
- `locator`
|
|
728
|
-
- `element` **([string][9] | [object][10])** located by CSS|XPath|strict locator.
|
|
729
|
-
|
|
730
|
-
Returns **[Promise][13]<[string][9]>** HTML code for an element
|
|
731
|
-
|
|
732
|
-
### grabHTMLFromAll
|
|
733
|
-
|
|
734
|
-
Retrieves all the innerHTML from elements located by CSS or XPath and returns it to test.
|
|
735
|
-
Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
736
|
-
|
|
737
|
-
```js
|
|
738
|
-
let postHTMLs = await I.grabHTMLFromAll('.post');
|
|
739
|
-
```
|
|
740
|
-
|
|
741
|
-
#### Parameters
|
|
742
|
-
|
|
743
|
-
- `locator`
|
|
744
|
-
- `element` **([string][9] | [object][10])** located by CSS|XPath|strict locator.
|
|
745
|
-
|
|
746
|
-
Returns **[Promise][13]<[Array][14]<[string][9]>>** HTML code for an element
|
|
747
|
-
|
|
748
|
-
### grabNumberOfOpenTabs
|
|
749
|
-
|
|
750
|
-
Grab number of open tabs.
|
|
751
|
-
Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
752
|
-
|
|
753
|
-
```js
|
|
754
|
-
let tabs = await I.grabNumberOfOpenTabs();
|
|
755
|
-
```
|
|
756
|
-
|
|
757
|
-
Returns **[Promise][13]<[number][7]>** number of open tabs
|
|
758
|
-
|
|
759
|
-
### grabNumberOfVisibleElements
|
|
760
|
-
|
|
761
|
-
Grab number of visible elements by locator.
|
|
762
|
-
Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
763
|
-
|
|
764
|
-
```js
|
|
765
|
-
let numOfElements = await I.grabNumberOfVisibleElements('p');
|
|
766
|
-
```
|
|
767
|
-
|
|
768
|
-
#### Parameters
|
|
769
|
-
|
|
770
|
-
- `locator` **([string][9] | [object][10])** located by CSS|XPath|strict locator.
|
|
771
|
-
|
|
772
|
-
Returns **[Promise][13]<[number][7]>** number of visible elements
|
|
773
|
-
|
|
774
|
-
### grabPageScrollPosition
|
|
775
|
-
|
|
776
|
-
Retrieves a page scroll position and returns it to test.
|
|
777
|
-
Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
778
|
-
|
|
779
|
-
```js
|
|
780
|
-
let { x, y } = await I.grabPageScrollPosition();
|
|
781
|
-
```
|
|
782
|
-
|
|
783
|
-
Returns **[Promise][13]<PageScrollPosition>** scroll position
|
|
784
|
-
|
|
785
|
-
### grabPopupText
|
|
786
|
-
|
|
787
|
-
Grab the text within the popup. If no popup is visible then it will return null
|
|
788
|
-
|
|
789
|
-
```js
|
|
790
|
-
await I.grabPopupText();
|
|
791
|
-
```
|
|
792
|
-
|
|
793
|
-
### grabSource
|
|
794
|
-
|
|
795
|
-
Retrieves page source and returns it to test.
|
|
796
|
-
Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
797
|
-
|
|
798
|
-
```js
|
|
799
|
-
let pageSource = await I.grabSource();
|
|
800
|
-
```
|
|
801
|
-
|
|
802
|
-
Returns **[Promise][13]<[string][9]>** source code
|
|
803
|
-
|
|
804
|
-
### grabTextFrom
|
|
805
|
-
|
|
806
|
-
Retrieves a text from an element located by CSS or XPath and returns it to test.
|
|
807
|
-
Resumes test execution, so **should be used inside async with `await`** operator.
|
|
808
|
-
|
|
809
|
-
```js
|
|
810
|
-
let pin = await I.grabTextFrom('#pin');
|
|
811
|
-
```
|
|
812
|
-
|
|
813
|
-
If multiple elements found returns first element.
|
|
814
|
-
|
|
815
|
-
#### Parameters
|
|
816
|
-
|
|
817
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
818
|
-
|
|
819
|
-
Returns **[Promise][13]<[string][9]>** attribute value
|
|
820
|
-
|
|
821
|
-
### grabTextFromAll
|
|
822
|
-
|
|
823
|
-
Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
824
|
-
Resumes test execution, so **should be used inside async with `await`** operator.
|
|
825
|
-
|
|
826
|
-
```js
|
|
827
|
-
let pins = await I.grabTextFromAll('#pin li');
|
|
828
|
-
```
|
|
829
|
-
|
|
830
|
-
#### Parameters
|
|
831
|
-
|
|
832
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
833
|
-
|
|
834
|
-
Returns **[Promise][13]<[Array][14]<[string][9]>>** attribute value
|
|
835
|
-
|
|
836
|
-
### grabTitle
|
|
837
|
-
|
|
838
|
-
Retrieves a page title and returns it to test.
|
|
839
|
-
Resumes test execution, so **should be used inside async with `await`** operator.
|
|
840
|
-
|
|
841
|
-
```js
|
|
842
|
-
let title = await I.grabTitle();
|
|
843
|
-
```
|
|
844
|
-
|
|
845
|
-
Returns **[Promise][13]<[string][9]>** title
|
|
846
|
-
|
|
847
|
-
### grabValueFrom
|
|
848
|
-
|
|
849
|
-
Retrieves a value from a form element located by CSS or XPath and returns it to test.
|
|
850
|
-
Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
851
|
-
If more than one element is found - value of first element is returned.
|
|
852
|
-
|
|
853
|
-
```js
|
|
854
|
-
let email = await I.grabValueFrom('input[name=email]');
|
|
855
|
-
```
|
|
856
|
-
|
|
857
|
-
#### Parameters
|
|
858
|
-
|
|
859
|
-
- `locator` **([string][9] | [object][10])** field located by label|name|CSS|XPath|strict locator.
|
|
860
|
-
|
|
861
|
-
Returns **[Promise][13]<[string][9]>** attribute value
|
|
862
|
-
|
|
863
|
-
### grabValueFromAll
|
|
864
|
-
|
|
865
|
-
Retrieves an array of value from a form located by CSS or XPath and returns it to test.
|
|
866
|
-
Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
867
|
-
|
|
868
|
-
```js
|
|
869
|
-
let inputs = await I.grabValueFromAll('//form/input');
|
|
870
|
-
```
|
|
871
|
-
|
|
872
|
-
#### Parameters
|
|
873
|
-
|
|
874
|
-
- `locator` **([string][9] | [object][10])** field located by label|name|CSS|XPath|strict locator.
|
|
875
|
-
|
|
876
|
-
Returns **[Promise][13]<[Array][14]<[string][9]>>** attribute value
|
|
877
|
-
|
|
878
|
-
### haveModule
|
|
879
|
-
|
|
880
|
-
Injects Angular module.
|
|
881
|
-
|
|
882
|
-
```js
|
|
883
|
-
I.haveModule('modName', function() {
|
|
884
|
-
angular.module('modName', []).value('foo', 'bar');
|
|
885
|
-
});
|
|
886
|
-
```
|
|
887
|
-
|
|
888
|
-
#### Parameters
|
|
889
|
-
|
|
890
|
-
- `modName`
|
|
891
|
-
- `fn`
|
|
892
|
-
|
|
893
|
-
### moveCursorTo
|
|
894
|
-
|
|
895
|
-
Moves cursor to element matched by locator.
|
|
896
|
-
Extra shift can be set with offsetX and offsetY options.
|
|
897
|
-
|
|
898
|
-
```js
|
|
899
|
-
I.moveCursorTo('.tooltip');
|
|
900
|
-
I.moveCursorTo('#submit', 5,5);
|
|
901
|
-
```
|
|
902
|
-
|
|
903
|
-
#### Parameters
|
|
904
|
-
|
|
905
|
-
- `locator` **([string][9] | [object][10])** located by CSS|XPath|strict locator.
|
|
906
|
-
- `offsetX` **[number][7]** (optional, `0` by default) X-axis offset.
|
|
907
|
-
- `offsetY` **[number][7]** (optional, `0` by default) Y-axis offset.
|
|
908
|
-
|
|
909
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
910
|
-
|
|
911
|
-
### moveTo
|
|
912
|
-
|
|
913
|
-
Moves to url
|
|
914
|
-
|
|
915
|
-
#### Parameters
|
|
916
|
-
|
|
917
|
-
- `path`
|
|
918
|
-
|
|
919
|
-
### openNewTab
|
|
920
|
-
|
|
921
|
-
Open new tab and switch to it
|
|
922
|
-
|
|
923
|
-
```js
|
|
924
|
-
I.openNewTab();
|
|
925
|
-
```
|
|
926
|
-
|
|
927
|
-
### pressKey
|
|
928
|
-
|
|
929
|
-
Presses a key on a focused element.
|
|
930
|
-
Special keys like 'Enter', 'Control', [etc][17]
|
|
931
|
-
will be replaced with corresponding unicode.
|
|
932
|
-
If modifier key is used (Control, Command, Alt, Shift) in array, it will be released afterwards.
|
|
933
|
-
|
|
934
|
-
```js
|
|
935
|
-
I.pressKey('Enter');
|
|
936
|
-
I.pressKey(['Control','a']);
|
|
937
|
-
```
|
|
938
|
-
|
|
939
|
-
#### Parameters
|
|
940
|
-
|
|
941
|
-
- `key` **([string][9] | [Array][14]<[string][9]>)** key or array of keys to press.
|
|
942
|
-
|
|
943
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
[Valid key names](https://w3c.github.io/webdriver/#keyboard-actions) are:
|
|
947
|
-
|
|
948
|
-
- `'Add'`,
|
|
949
|
-
- `'Alt'`,
|
|
950
|
-
- `'ArrowDown'` or `'Down arrow'`,
|
|
951
|
-
- `'ArrowLeft'` or `'Left arrow'`,
|
|
952
|
-
- `'ArrowRight'` or `'Right arrow'`,
|
|
953
|
-
- `'ArrowUp'` or `'Up arrow'`,
|
|
954
|
-
- `'Backspace'`,
|
|
955
|
-
- `'Command'`,
|
|
956
|
-
- `'Control'`,
|
|
957
|
-
- `'Del'`,
|
|
958
|
-
- `'Divide'`,
|
|
959
|
-
- `'End'`,
|
|
960
|
-
- `'Enter'`,
|
|
961
|
-
- `'Equals'`,
|
|
962
|
-
- `'Escape'`,
|
|
963
|
-
- `'F1 to F12'`,
|
|
964
|
-
- `'Home'`,
|
|
965
|
-
- `'Insert'`,
|
|
966
|
-
- `'Meta'`,
|
|
967
|
-
- `'Multiply'`,
|
|
968
|
-
- `'Numpad 0'` to `'Numpad 9'`,
|
|
969
|
-
- `'Pagedown'` or `'PageDown'`,
|
|
970
|
-
- `'Pageup'` or `'PageUp'`,
|
|
971
|
-
- `'Pause'`,
|
|
972
|
-
- `'Semicolon'`,
|
|
973
|
-
- `'Shift'`,
|
|
974
|
-
- `'Space'`,
|
|
975
|
-
- `'Subtract'`,
|
|
976
|
-
- `'Tab'`.
|
|
977
|
-
|
|
978
|
-
### refresh
|
|
979
|
-
|
|
980
|
-
Reloads page
|
|
981
|
-
|
|
982
|
-
### refreshPage
|
|
983
|
-
|
|
984
|
-
Reload the current page.
|
|
985
|
-
|
|
986
|
-
```js
|
|
987
|
-
I.refreshPage();
|
|
988
|
-
```
|
|
989
|
-
|
|
990
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
991
|
-
|
|
992
|
-
### resetModule
|
|
993
|
-
|
|
994
|
-
Removes mocked Angular module. If modName not specified - clears all mock modules.
|
|
995
|
-
|
|
996
|
-
```js
|
|
997
|
-
I.resetModule(); // clears all
|
|
998
|
-
I.resetModule('modName');
|
|
999
|
-
```
|
|
1000
|
-
|
|
1001
|
-
#### Parameters
|
|
1002
|
-
|
|
1003
|
-
- `modName`
|
|
1004
|
-
|
|
1005
|
-
### resizeWindow
|
|
1006
|
-
|
|
1007
|
-
Resize the current window to provided width and height.
|
|
1008
|
-
First parameter can be set to `maximize`.
|
|
1009
|
-
|
|
1010
|
-
#### Parameters
|
|
1011
|
-
|
|
1012
|
-
- `width` **[number][7]** width in pixels or `maximize`.
|
|
1013
|
-
- `height` **[number][7]** height in pixels.
|
|
1014
|
-
|
|
1015
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1016
|
-
|
|
1017
|
-
### rightClick
|
|
1018
|
-
|
|
1019
|
-
Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
1020
|
-
|
|
1021
|
-
```js
|
|
1022
|
-
// right click element with id el
|
|
1023
|
-
I.rightClick('#el');
|
|
1024
|
-
// right click link or button with text "Click me"
|
|
1025
|
-
I.rightClick('Click me');
|
|
1026
|
-
// right click button with text "Click me" inside .context
|
|
1027
|
-
I.rightClick('Click me', '.context');
|
|
1028
|
-
```
|
|
1029
|
-
|
|
1030
|
-
#### Parameters
|
|
1031
|
-
|
|
1032
|
-
- `locator` **([string][9] | [object][10])** clickable element located by CSS|XPath|strict locator.
|
|
1033
|
-
- `context` **([string][9]? | [object][10])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1034
|
-
|
|
1035
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1036
|
-
|
|
1037
|
-
### saveElementScreenshot
|
|
1038
|
-
|
|
1039
|
-
Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
1040
|
-
Filename is relative to output folder.
|
|
1041
|
-
|
|
1042
|
-
```js
|
|
1043
|
-
I.saveElementScreenshot(`#submit`,'debug.png');
|
|
1044
|
-
```
|
|
1045
|
-
|
|
1046
|
-
#### Parameters
|
|
1047
|
-
|
|
1048
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1049
|
-
- `fileName` **[string][9]** file name to save.
|
|
1050
|
-
|
|
1051
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1052
|
-
|
|
1053
|
-
### saveScreenshot
|
|
1054
|
-
|
|
1055
|
-
Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
1056
|
-
Filename is relative to output folder.
|
|
1057
|
-
Optionally resize the window to the full available page `scrollHeight` and `scrollWidth` to capture the entire page by passing `true` in as the second argument.
|
|
1058
|
-
|
|
1059
|
-
```js
|
|
1060
|
-
I.saveScreenshot('debug.png');
|
|
1061
|
-
I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scrollWidth before taking screenshot
|
|
1062
|
-
```
|
|
1063
|
-
|
|
1064
|
-
#### Parameters
|
|
1065
|
-
|
|
1066
|
-
- `fileName` **[string][9]** file name to save.
|
|
1067
|
-
- `fullPage` **[boolean][18]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
1068
|
-
|
|
1069
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1070
|
-
|
|
1071
|
-
### scrollPageToBottom
|
|
1072
|
-
|
|
1073
|
-
Scroll page to the bottom.
|
|
1074
|
-
|
|
1075
|
-
```js
|
|
1076
|
-
I.scrollPageToBottom();
|
|
1077
|
-
```
|
|
1078
|
-
|
|
1079
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1080
|
-
|
|
1081
|
-
### scrollPageToTop
|
|
1082
|
-
|
|
1083
|
-
Scroll page to the top.
|
|
1084
|
-
|
|
1085
|
-
```js
|
|
1086
|
-
I.scrollPageToTop();
|
|
1087
|
-
```
|
|
1088
|
-
|
|
1089
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1090
|
-
|
|
1091
|
-
### scrollTo
|
|
1092
|
-
|
|
1093
|
-
Scrolls to element matched by locator.
|
|
1094
|
-
Extra shift can be set with offsetX and offsetY options.
|
|
1095
|
-
|
|
1096
|
-
```js
|
|
1097
|
-
I.scrollTo('footer');
|
|
1098
|
-
I.scrollTo('#submit', 5, 5);
|
|
1099
|
-
```
|
|
1100
|
-
|
|
1101
|
-
#### Parameters
|
|
1102
|
-
|
|
1103
|
-
- `locator` **([string][9] | [object][10])** located by CSS|XPath|strict locator.
|
|
1104
|
-
- `offsetX` **[number][7]** (optional, `0` by default) X-axis offset.
|
|
1105
|
-
- `offsetY` **[number][7]** (optional, `0` by default) Y-axis offset.
|
|
1106
|
-
|
|
1107
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1108
|
-
|
|
1109
|
-
### see
|
|
1110
|
-
|
|
1111
|
-
Checks that a page contains a visible text.
|
|
1112
|
-
Use context parameter to narrow down the search.
|
|
1113
|
-
|
|
1114
|
-
```js
|
|
1115
|
-
I.see('Welcome'); // text welcome on a page
|
|
1116
|
-
I.see('Welcome', '.content'); // text inside .content div
|
|
1117
|
-
I.see('Register', {css: 'form.register'}); // use strict locator
|
|
1118
|
-
```
|
|
1119
|
-
|
|
1120
|
-
#### Parameters
|
|
1121
|
-
|
|
1122
|
-
- `text` **[string][9]** expected on page.
|
|
1123
|
-
- `context` **([string][9]? | [object][10])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1124
|
-
|
|
1125
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1126
|
-
|
|
1127
|
-
### seeAttributesOnElements
|
|
1128
|
-
|
|
1129
|
-
Checks that all elements with given locator have given attributes.
|
|
1130
|
-
|
|
1131
|
-
```js
|
|
1132
|
-
I.seeAttributesOnElements('//form', { method: "post"});
|
|
1133
|
-
```
|
|
1134
|
-
|
|
1135
|
-
#### Parameters
|
|
1136
|
-
|
|
1137
|
-
- `locator` **([string][9] | [object][10])** located by CSS|XPath|strict locator.
|
|
1138
|
-
- `attributes` **[object][10]** attributes and their values to check.
|
|
1139
|
-
|
|
1140
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1141
|
-
|
|
1142
|
-
### seeCheckboxIsChecked
|
|
1143
|
-
|
|
1144
|
-
Verifies that the specified checkbox is checked.
|
|
1145
|
-
|
|
1146
|
-
```js
|
|
1147
|
-
I.seeCheckboxIsChecked('Agree');
|
|
1148
|
-
I.seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
|
|
1149
|
-
I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
1150
|
-
```
|
|
1151
|
-
|
|
1152
|
-
#### Parameters
|
|
1153
|
-
|
|
1154
|
-
- `field` **([string][9] | [object][10])** located by label|name|CSS|XPath|strict locator.
|
|
1155
|
-
|
|
1156
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1157
|
-
|
|
1158
|
-
### seeCookie
|
|
1159
|
-
|
|
1160
|
-
Checks that cookie with given name exists.
|
|
1161
|
-
|
|
1162
|
-
```js
|
|
1163
|
-
I.seeCookie('Auth');
|
|
1164
|
-
```
|
|
1165
|
-
|
|
1166
|
-
#### Parameters
|
|
1167
|
-
|
|
1168
|
-
- `name` **[string][9]** cookie name.
|
|
1169
|
-
|
|
1170
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1171
|
-
|
|
1172
|
-
### seeCssPropertiesOnElements
|
|
1173
|
-
|
|
1174
|
-
Checks that all elements with given locator have given CSS properties.
|
|
1175
|
-
|
|
1176
|
-
```js
|
|
1177
|
-
I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
|
|
1178
|
-
```
|
|
1179
|
-
|
|
1180
|
-
#### Parameters
|
|
1181
|
-
|
|
1182
|
-
- `locator` **([string][9] | [object][10])** located by CSS|XPath|strict locator.
|
|
1183
|
-
- `cssProperties` **[object][10]** object with CSS properties and their values to check.
|
|
1184
|
-
|
|
1185
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1186
|
-
|
|
1187
|
-
### seeCurrentUrlEquals
|
|
1188
|
-
|
|
1189
|
-
Checks that current url is equal to provided one.
|
|
1190
|
-
If a relative url provided, a configured url will be prepended to it.
|
|
1191
|
-
So both examples will work:
|
|
1192
|
-
|
|
1193
|
-
```js
|
|
1194
|
-
I.seeCurrentUrlEquals('/register');
|
|
1195
|
-
I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
1196
|
-
```
|
|
1197
|
-
|
|
1198
|
-
#### Parameters
|
|
1199
|
-
|
|
1200
|
-
- `url` **[string][9]** value to check.
|
|
1201
|
-
|
|
1202
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1203
|
-
|
|
1204
|
-
### seeElement
|
|
1205
|
-
|
|
1206
|
-
Checks that a given Element is visible
|
|
1207
|
-
Element is located by CSS or XPath.
|
|
1208
|
-
|
|
1209
|
-
```js
|
|
1210
|
-
I.seeElement('#modal');
|
|
1211
|
-
```
|
|
1212
|
-
|
|
1213
|
-
#### Parameters
|
|
1214
|
-
|
|
1215
|
-
- `locator` **([string][9] | [object][10])** located by CSS|XPath|strict locator.
|
|
1216
|
-
|
|
1217
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1218
|
-
|
|
1219
|
-
### seeElementInDOM
|
|
1220
|
-
|
|
1221
|
-
Checks that a given Element is present in the DOM
|
|
1222
|
-
Element is located by CSS or XPath.
|
|
1223
|
-
|
|
1224
|
-
```js
|
|
1225
|
-
I.seeElementInDOM('#modal');
|
|
1226
|
-
```
|
|
1227
|
-
|
|
1228
|
-
#### Parameters
|
|
1229
|
-
|
|
1230
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1231
|
-
|
|
1232
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1233
|
-
|
|
1234
|
-
### seeInCurrentUrl
|
|
1235
|
-
|
|
1236
|
-
Checks that current url contains a provided fragment.
|
|
1237
|
-
|
|
1238
|
-
```js
|
|
1239
|
-
I.seeInCurrentUrl('/register'); // we are on registration page
|
|
1240
|
-
```
|
|
1241
|
-
|
|
1242
|
-
#### Parameters
|
|
1243
|
-
|
|
1244
|
-
- `url` **[string][9]** a fragment to check
|
|
1245
|
-
|
|
1246
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1247
|
-
|
|
1248
|
-
### seeInField
|
|
1249
|
-
|
|
1250
|
-
Checks that the given input field or textarea equals to given value.
|
|
1251
|
-
For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
1252
|
-
|
|
1253
|
-
```js
|
|
1254
|
-
I.seeInField('Username', 'davert');
|
|
1255
|
-
I.seeInField({css: 'form textarea'},'Type your comment here');
|
|
1256
|
-
I.seeInField('form input[type=hidden]','hidden_value');
|
|
1257
|
-
I.seeInField('#searchform input','Search');
|
|
1258
|
-
```
|
|
1259
|
-
|
|
1260
|
-
#### Parameters
|
|
1261
|
-
|
|
1262
|
-
- `field` **([string][9] | [object][10])** located by label|name|CSS|XPath|strict locator.
|
|
1263
|
-
- `value` **([string][9] | [object][10])** value to check.
|
|
1264
|
-
|
|
1265
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1266
|
-
|
|
1267
|
-
### seeInPopup
|
|
1268
|
-
|
|
1269
|
-
Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the
|
|
1270
|
-
given string.
|
|
1271
|
-
|
|
1272
|
-
```js
|
|
1273
|
-
I.seeInPopup('Popup text');
|
|
1274
|
-
```
|
|
1275
|
-
|
|
1276
|
-
#### Parameters
|
|
1277
|
-
|
|
1278
|
-
- `text` **[string][9]** value to check.
|
|
1279
|
-
|
|
1280
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1281
|
-
|
|
1282
|
-
### seeInSource
|
|
1283
|
-
|
|
1284
|
-
Checks that the current page contains the given string in its raw source code.
|
|
1285
|
-
|
|
1286
|
-
```js
|
|
1287
|
-
I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
1288
|
-
```
|
|
1289
|
-
|
|
1290
|
-
#### Parameters
|
|
1291
|
-
|
|
1292
|
-
- `text` **[string][9]** value to check.
|
|
1293
|
-
|
|
1294
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1295
|
-
|
|
1296
|
-
### seeInTitle
|
|
1297
|
-
|
|
1298
|
-
Checks that title contains text.
|
|
1299
|
-
|
|
1300
|
-
```js
|
|
1301
|
-
I.seeInTitle('Home Page');
|
|
1302
|
-
```
|
|
1303
|
-
|
|
1304
|
-
#### Parameters
|
|
1305
|
-
|
|
1306
|
-
- `text` **[string][9]** text value to check.
|
|
1307
|
-
|
|
1308
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1309
|
-
|
|
1310
|
-
### seeNumberOfElements
|
|
1311
|
-
|
|
1312
|
-
Asserts that an element appears a given number of times in the DOM.
|
|
1313
|
-
Element is located by label or name or CSS or XPath.
|
|
1314
|
-
|
|
1315
|
-
```js
|
|
1316
|
-
I.seeNumberOfElements('#submitBtn', 1);
|
|
1317
|
-
```
|
|
1318
|
-
|
|
1319
|
-
#### Parameters
|
|
1320
|
-
|
|
1321
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1322
|
-
- `num` **[number][7]** number of elements.
|
|
1323
|
-
|
|
1324
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1325
|
-
|
|
1326
|
-
### seeNumberOfVisibleElements
|
|
1327
|
-
|
|
1328
|
-
Asserts that an element is visible a given number of times.
|
|
1329
|
-
Element is located by CSS or XPath.
|
|
1330
|
-
|
|
1331
|
-
```js
|
|
1332
|
-
I.seeNumberOfVisibleElements('.buttons', 3);
|
|
1333
|
-
```
|
|
1334
|
-
|
|
1335
|
-
#### Parameters
|
|
1336
|
-
|
|
1337
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1338
|
-
- `num` **[number][7]** number of elements.
|
|
1339
|
-
|
|
1340
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1341
|
-
|
|
1342
|
-
### seeTextEquals
|
|
1343
|
-
|
|
1344
|
-
Checks that text is equal to provided one.
|
|
1345
|
-
|
|
1346
|
-
```js
|
|
1347
|
-
I.seeTextEquals('text', 'h1');
|
|
1348
|
-
```
|
|
1349
|
-
|
|
1350
|
-
#### Parameters
|
|
1351
|
-
|
|
1352
|
-
- `text` **[string][9]** element value to check.
|
|
1353
|
-
- `context` **([string][9] | [object][10])?** element located by CSS|XPath|strict locator.
|
|
1354
|
-
|
|
1355
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1356
|
-
|
|
1357
|
-
### seeTitleEquals
|
|
1358
|
-
|
|
1359
|
-
Checks that title is equal to provided one.
|
|
1360
|
-
|
|
1361
|
-
```js
|
|
1362
|
-
I.seeTitleEquals('Test title.');
|
|
1363
|
-
```
|
|
1364
|
-
|
|
1365
|
-
#### Parameters
|
|
1366
|
-
|
|
1367
|
-
- `text` **[string][9]** value to check.
|
|
1368
|
-
|
|
1369
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1370
|
-
|
|
1371
|
-
### selectOption
|
|
1372
|
-
|
|
1373
|
-
Selects an option in a drop-down select.
|
|
1374
|
-
Field is searched by label | name | CSS | XPath.
|
|
1375
|
-
Option is selected by visible text or by value.
|
|
1376
|
-
|
|
1377
|
-
```js
|
|
1378
|
-
I.selectOption('Choose Plan', 'Monthly'); // select by label
|
|
1379
|
-
I.selectOption('subscription', 'Monthly'); // match option by text
|
|
1380
|
-
I.selectOption('subscription', '0'); // or by value
|
|
1381
|
-
I.selectOption('//form/select[@name=account]','Premium');
|
|
1382
|
-
I.selectOption('form select[name=account]', 'Premium');
|
|
1383
|
-
I.selectOption({css: 'form select[name=account]'}, 'Premium');
|
|
1384
|
-
```
|
|
1385
|
-
|
|
1386
|
-
Provide an array for the second argument to select multiple options.
|
|
1387
|
-
|
|
1388
|
-
```js
|
|
1389
|
-
I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
1390
|
-
```
|
|
1391
|
-
|
|
1392
|
-
#### Parameters
|
|
1393
|
-
|
|
1394
|
-
- `select` **([string][9] | [object][10])** field located by label|name|CSS|XPath|strict locator.
|
|
1395
|
-
- `option` **([string][9] | [Array][14]<any>)** visible text or value of option.
|
|
1396
|
-
|
|
1397
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1398
|
-
|
|
1399
|
-
### setCookie
|
|
1400
|
-
|
|
1401
|
-
Sets cookie(s).
|
|
1402
|
-
|
|
1403
|
-
Can be a single cookie object or an array of cookies:
|
|
1404
|
-
|
|
1405
|
-
```js
|
|
1406
|
-
I.setCookie({name: 'auth', value: true});
|
|
1407
|
-
|
|
1408
|
-
// as array
|
|
1409
|
-
I.setCookie([
|
|
1410
|
-
{name: 'auth', value: true},
|
|
1411
|
-
{name: 'agree', value: true}
|
|
1412
|
-
]);
|
|
1413
|
-
```
|
|
1414
|
-
|
|
1415
|
-
#### Parameters
|
|
1416
|
-
|
|
1417
|
-
- `cookie` **(Cookie | [Array][14]<Cookie>)** a cookie object or array of cookie objects.
|
|
1418
|
-
|
|
1419
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1420
|
-
|
|
1421
|
-
### switchTo
|
|
1422
|
-
|
|
1423
|
-
Switches frame or in case of null locator reverts to parent.
|
|
1424
|
-
|
|
1425
|
-
```js
|
|
1426
|
-
I.switchTo('iframe'); // switch to first iframe
|
|
1427
|
-
I.switchTo(); // switch back to main page
|
|
1428
|
-
```
|
|
1429
|
-
|
|
1430
|
-
#### Parameters
|
|
1431
|
-
|
|
1432
|
-
- `locator` **([string][9]? | [object][10])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1433
|
-
|
|
1434
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1435
|
-
|
|
1436
|
-
### switchToNextTab
|
|
1437
|
-
|
|
1438
|
-
Switch focus to a particular tab by its number. It waits tabs loading and then switch tab
|
|
1439
|
-
|
|
1440
|
-
```js
|
|
1441
|
-
I.switchToNextTab();
|
|
1442
|
-
I.switchToNextTab(2);
|
|
1443
|
-
```
|
|
1444
|
-
|
|
1445
|
-
#### Parameters
|
|
1446
|
-
|
|
1447
|
-
- `num`
|
|
1448
|
-
|
|
1449
|
-
### switchToPreviousTab
|
|
1450
|
-
|
|
1451
|
-
Switch focus to a particular tab by its number. It waits tabs loading and then switch tab
|
|
1452
|
-
|
|
1453
|
-
```js
|
|
1454
|
-
I.switchToPreviousTab();
|
|
1455
|
-
I.switchToPreviousTab(2);
|
|
1456
|
-
```
|
|
1457
|
-
|
|
1458
|
-
#### Parameters
|
|
1459
|
-
|
|
1460
|
-
- `num`
|
|
1461
|
-
|
|
1462
|
-
### uncheckOption
|
|
1463
|
-
|
|
1464
|
-
Unselects a checkbox or radio button.
|
|
1465
|
-
Element is located by label or name or CSS or XPath.
|
|
1466
|
-
|
|
1467
|
-
The second parameter is a context (CSS or XPath locator) to narrow the search.
|
|
1468
|
-
|
|
1469
|
-
```js
|
|
1470
|
-
I.uncheckOption('#agree');
|
|
1471
|
-
I.uncheckOption('I Agree to Terms and Conditions');
|
|
1472
|
-
I.uncheckOption('agree', '//form');
|
|
1473
|
-
```
|
|
1474
|
-
|
|
1475
|
-
#### Parameters
|
|
1476
|
-
|
|
1477
|
-
- `field` **([string][9] | [object][10])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
1478
|
-
- `context` **([string][9]? | [object][10])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1479
|
-
|
|
1480
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1481
|
-
|
|
1482
|
-
### useProtractorTo
|
|
1483
|
-
|
|
1484
|
-
Use [Protractor][19] API inside a test.
|
|
1485
|
-
|
|
1486
|
-
First argument is a description of an action.
|
|
1487
|
-
Second argument is async function that gets this helper as parameter.
|
|
1488
|
-
|
|
1489
|
-
{ [`browser`][20]) } object from Protractor API is available.
|
|
1490
|
-
|
|
1491
|
-
```js
|
|
1492
|
-
I.useProtractorTo('change url via in-page navigation', async ({ browser }) {
|
|
1493
|
-
await browser.setLocation('api');
|
|
1494
|
-
});
|
|
1495
|
-
```
|
|
1496
|
-
|
|
1497
|
-
#### Parameters
|
|
1498
|
-
|
|
1499
|
-
- `description` **[string][9]** used to show in logs.
|
|
1500
|
-
- `fn` **[function][12]** async functuion that executed with Protractor helper as argument
|
|
1501
|
-
|
|
1502
|
-
### wait
|
|
1503
|
-
|
|
1504
|
-
Pauses execution for a number of seconds.
|
|
1505
|
-
|
|
1506
|
-
```js
|
|
1507
|
-
I.wait(2); // wait 2 secs
|
|
1508
|
-
```
|
|
1509
|
-
|
|
1510
|
-
#### Parameters
|
|
1511
|
-
|
|
1512
|
-
- `sec` **[number][7]** number of second to wait.
|
|
1513
|
-
|
|
1514
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1515
|
-
|
|
1516
|
-
### waitForClickable
|
|
1517
|
-
|
|
1518
|
-
Waits for element to become clickable for number of seconds.
|
|
1519
|
-
|
|
1520
|
-
```js
|
|
1521
|
-
I.waitForClickable('#link');
|
|
1522
|
-
```
|
|
1523
|
-
|
|
1524
|
-
#### Parameters
|
|
1525
|
-
|
|
1526
|
-
- `locator`
|
|
1527
|
-
- `sec`
|
|
1528
|
-
|
|
1529
|
-
### waitForDetached
|
|
1530
|
-
|
|
1531
|
-
Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
|
|
1532
|
-
Element can be located by CSS or XPath.
|
|
1533
|
-
|
|
1534
|
-
```js
|
|
1535
|
-
I.waitForDetached('#popup');
|
|
1536
|
-
```
|
|
1537
|
-
|
|
1538
|
-
#### Parameters
|
|
1539
|
-
|
|
1540
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1541
|
-
- `sec` **[number][7]** (optional, `1` by default) time in seconds to wait
|
|
1542
|
-
|
|
1543
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1544
|
-
|
|
1545
|
-
### waitForElement
|
|
1546
|
-
|
|
1547
|
-
Waits for element to be present on page (by default waits for 1sec).
|
|
1548
|
-
Element can be located by CSS or XPath.
|
|
1549
|
-
|
|
1550
|
-
```js
|
|
1551
|
-
I.waitForElement('.btn.continue');
|
|
1552
|
-
I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
1553
|
-
```
|
|
1554
|
-
|
|
1555
|
-
#### Parameters
|
|
1556
|
-
|
|
1557
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1558
|
-
- `sec` **[number][7]?** (optional, `1` by default) time in seconds to wait
|
|
1559
|
-
|
|
1560
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1561
|
-
|
|
1562
|
-
### waitForEnabled
|
|
1563
|
-
|
|
1564
|
-
Waits for element to become enabled (by default waits for 1sec).
|
|
1565
|
-
Element can be located by CSS or XPath.
|
|
1566
|
-
|
|
1567
|
-
#### Parameters
|
|
1568
|
-
|
|
1569
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1570
|
-
- `sec` **[number][7]** (optional) time in seconds to wait, 1 by default.
|
|
1571
|
-
|
|
1572
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1573
|
-
|
|
1574
|
-
### waitForFunction
|
|
1575
|
-
|
|
1576
|
-
Waits for a function to return true (waits for 1 sec by default).
|
|
1577
|
-
Running in browser context.
|
|
1578
|
-
|
|
1579
|
-
```js
|
|
1580
|
-
I.waitForFunction(fn[, [args[, timeout]])
|
|
1581
|
-
```
|
|
1582
|
-
|
|
1583
|
-
```js
|
|
1584
|
-
I.waitForFunction(() => window.requests == 0);
|
|
1585
|
-
I.waitForFunction(() => window.requests == 0, 5); // waits for 5 sec
|
|
1586
|
-
I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and wait for 5 sec
|
|
1587
|
-
```
|
|
1588
|
-
|
|
1589
|
-
#### Parameters
|
|
1590
|
-
|
|
1591
|
-
- `fn` **([string][9] | [function][12])** to be executed in browser context.
|
|
1592
|
-
- `argsOrSec` **([Array][14]<any> | [number][7])?** (optional, `1` by default) arguments for function or seconds.
|
|
1593
|
-
- `sec` **[number][7]?** (optional, `1` by default) time in seconds to wait
|
|
1594
|
-
|
|
1595
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1596
|
-
|
|
1597
|
-
### waitForInvisible
|
|
1598
|
-
|
|
1599
|
-
Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
1600
|
-
Element can be located by CSS or XPath.
|
|
1601
|
-
|
|
1602
|
-
```js
|
|
1603
|
-
I.waitForInvisible('#popup');
|
|
1604
|
-
```
|
|
1605
|
-
|
|
1606
|
-
#### Parameters
|
|
1607
|
-
|
|
1608
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1609
|
-
- `sec` **[number][7]** (optional, `1` by default) time in seconds to wait
|
|
1610
|
-
|
|
1611
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1612
|
-
|
|
1613
|
-
### waitForText
|
|
1614
|
-
|
|
1615
|
-
Waits for a text to appear (by default waits for 1sec).
|
|
1616
|
-
Element can be located by CSS or XPath.
|
|
1617
|
-
Narrow down search results by providing context.
|
|
1618
|
-
|
|
1619
|
-
```js
|
|
1620
|
-
I.waitForText('Thank you, form has been submitted');
|
|
1621
|
-
I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
1622
|
-
```
|
|
1623
|
-
|
|
1624
|
-
#### Parameters
|
|
1625
|
-
|
|
1626
|
-
- `text` **[string][9]** to wait for.
|
|
1627
|
-
- `sec` **[number][7]** (optional, `1` by default) time in seconds to wait
|
|
1628
|
-
- `context` **([string][9] | [object][10])?** (optional) element located by CSS|XPath|strict locator.
|
|
1629
|
-
|
|
1630
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1631
|
-
|
|
1632
|
-
### waitForValue
|
|
1633
|
-
|
|
1634
|
-
Waits for the specified value to be in value attribute.
|
|
1635
|
-
|
|
1636
|
-
```js
|
|
1637
|
-
I.waitForValue('//input', "GoodValue");
|
|
1638
|
-
```
|
|
1639
|
-
|
|
1640
|
-
#### Parameters
|
|
1641
|
-
|
|
1642
|
-
- `field` **([string][9] | [object][10])** input field.
|
|
1643
|
-
- `value` **[string][9]** expected value.
|
|
1644
|
-
- `sec` **[number][7]** (optional, `1` by default) time in seconds to wait
|
|
1645
|
-
|
|
1646
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1647
|
-
|
|
1648
|
-
### waitForVisible
|
|
1649
|
-
|
|
1650
|
-
Waits for an element to become visible on a page (by default waits for 1sec).
|
|
1651
|
-
Element can be located by CSS or XPath.
|
|
1652
|
-
|
|
1653
|
-
```js
|
|
1654
|
-
I.waitForVisible('#popup');
|
|
1655
|
-
```
|
|
1656
|
-
|
|
1657
|
-
#### Parameters
|
|
1658
|
-
|
|
1659
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1660
|
-
- `sec` **[number][7]** (optional, `1` by default) time in seconds to wait
|
|
1661
|
-
|
|
1662
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1663
|
-
|
|
1664
|
-
### waitInUrl
|
|
1665
|
-
|
|
1666
|
-
Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
1667
|
-
|
|
1668
|
-
```js
|
|
1669
|
-
I.waitInUrl('/info', 2);
|
|
1670
|
-
```
|
|
1671
|
-
|
|
1672
|
-
#### Parameters
|
|
1673
|
-
|
|
1674
|
-
- `urlPart` **[string][9]** value to check.
|
|
1675
|
-
- `sec` **[number][7]** (optional, `1` by default) time in seconds to wait
|
|
1676
|
-
|
|
1677
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1678
|
-
|
|
1679
|
-
### waitNumberOfVisibleElements
|
|
1680
|
-
|
|
1681
|
-
Waits for a specified number of elements on the page.
|
|
1682
|
-
|
|
1683
|
-
```js
|
|
1684
|
-
I.waitNumberOfVisibleElements('a', 3);
|
|
1685
|
-
```
|
|
1686
|
-
|
|
1687
|
-
#### Parameters
|
|
1688
|
-
|
|
1689
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1690
|
-
- `num` **[number][7]** number of elements.
|
|
1691
|
-
- `sec` **[number][7]** (optional, `1` by default) time in seconds to wait
|
|
1692
|
-
|
|
1693
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1694
|
-
|
|
1695
|
-
### waitToHide
|
|
1696
|
-
|
|
1697
|
-
Waits for an element to hide (by default waits for 1sec).
|
|
1698
|
-
Element can be located by CSS or XPath.
|
|
1699
|
-
|
|
1700
|
-
```js
|
|
1701
|
-
I.waitToHide('#popup');
|
|
1702
|
-
```
|
|
1703
|
-
|
|
1704
|
-
#### Parameters
|
|
1705
|
-
|
|
1706
|
-
- `locator` **([string][9] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1707
|
-
- `sec` **[number][7]** (optional, `1` by default) time in seconds to wait
|
|
1708
|
-
|
|
1709
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1710
|
-
|
|
1711
|
-
### waitUrlEquals
|
|
1712
|
-
|
|
1713
|
-
Waits for the entire URL to match the expected
|
|
1714
|
-
|
|
1715
|
-
```js
|
|
1716
|
-
I.waitUrlEquals('/info', 2);
|
|
1717
|
-
I.waitUrlEquals('http://127.0.0.1:8000/info');
|
|
1718
|
-
```
|
|
1719
|
-
|
|
1720
|
-
#### Parameters
|
|
1721
|
-
|
|
1722
|
-
- `urlPart` **[string][9]** value to check.
|
|
1723
|
-
- `sec` **[number][7]** (optional, `1` by default) time in seconds to wait
|
|
1724
|
-
|
|
1725
|
-
Returns **void** automatically synchronized promise through #recorder
|
|
1726
|
-
|
|
1727
|
-
## locator
|
|
1728
|
-
|
|
1729
|
-
just press button if no selector is given
|
|
1730
|
-
|
|
1731
|
-
[1]: http://www.protractortest.org
|
|
1732
|
-
|
|
1733
|
-
[2]: http://codecept.io/quickstart/#prepare-selenium-server
|
|
1734
|
-
|
|
1735
|
-
[3]: http://codecept.io/acceptance/#smartwait
|
|
1736
|
-
|
|
1737
|
-
[4]: http://localhost:4444/wd/hub
|
|
1738
|
-
|
|
1739
|
-
[5]: https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities
|
|
1740
|
-
|
|
1741
|
-
[6]: https://github.com/angular/protractor/blob/master/docs/referenceConf.js
|
|
1742
|
-
|
|
1743
|
-
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
1744
|
-
|
|
1745
|
-
[8]: http://jster.net/category/windows-modals-popups
|
|
1746
|
-
|
|
1747
|
-
[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
1748
|
-
|
|
1749
|
-
[10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
1750
|
-
|
|
1751
|
-
[11]: https://vuejs.org/v2/api/#Vue-nextTick
|
|
1752
|
-
|
|
1753
|
-
[12]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
|
|
1754
|
-
|
|
1755
|
-
[13]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
|
1756
|
-
|
|
1757
|
-
[14]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
1758
|
-
|
|
1759
|
-
[15]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined
|
|
1760
|
-
|
|
1761
|
-
[16]: https://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object
|
|
1762
|
-
|
|
1763
|
-
[17]: https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value
|
|
1764
|
-
|
|
1765
|
-
[18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
1766
|
-
|
|
1767
|
-
[19]: https://www.protractortest.org/#/api
|
|
1768
|
-
|
|
1769
|
-
[20]: https://www.protractortest.org/#/api?view=ProtractorBrowser
|