codeceptjs 3.5.12-beta.1 → 3.5.12-beta.2

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.
Files changed (213) hide show
  1. package/docs/advanced.md +351 -0
  2. package/docs/ai.md +248 -0
  3. package/docs/api.md +323 -0
  4. package/docs/basics.md +979 -0
  5. package/docs/bdd.md +539 -0
  6. package/docs/best.md +237 -0
  7. package/docs/books.md +37 -0
  8. package/docs/bootstrap.md +135 -0
  9. package/docs/build/ApiDataFactory.js +410 -0
  10. package/docs/build/Appium.js +2027 -0
  11. package/docs/build/Expect.js +422 -0
  12. package/docs/build/FileSystem.js +228 -0
  13. package/docs/build/GraphQL.js +229 -0
  14. package/docs/build/GraphQLDataFactory.js +309 -0
  15. package/docs/build/JSONResponse.js +338 -0
  16. package/docs/build/Mochawesome.js +71 -0
  17. package/docs/build/Nightmare.js +2152 -0
  18. package/docs/build/OpenAI.js +126 -0
  19. package/docs/build/Playwright.js +5110 -0
  20. package/docs/build/Protractor.js +2706 -0
  21. package/docs/build/Puppeteer.js +3905 -0
  22. package/docs/build/REST.js +344 -0
  23. package/docs/build/TestCafe.js +2125 -0
  24. package/docs/build/WebDriver.js +4240 -0
  25. package/docs/changelog.md +2572 -0
  26. package/docs/commands.md +266 -0
  27. package/docs/community-helpers.md +58 -0
  28. package/docs/configuration.md +157 -0
  29. package/docs/continuous-integration.md +22 -0
  30. package/docs/custom-helpers.md +306 -0
  31. package/docs/data.md +379 -0
  32. package/docs/detox.md +235 -0
  33. package/docs/docker.md +136 -0
  34. package/docs/email.md +183 -0
  35. package/docs/examples.md +149 -0
  36. package/docs/helpers/ApiDataFactory.md +266 -0
  37. package/docs/helpers/Appium.md +1374 -0
  38. package/docs/helpers/Detox.md +586 -0
  39. package/docs/helpers/Expect.md +275 -0
  40. package/docs/helpers/FileSystem.md +152 -0
  41. package/docs/helpers/GraphQL.md +151 -0
  42. package/docs/helpers/GraphQLDataFactory.md +226 -0
  43. package/docs/helpers/JSONResponse.md +254 -0
  44. package/docs/helpers/Mochawesome.md +8 -0
  45. package/docs/helpers/MockRequest.md +377 -0
  46. package/docs/helpers/Nightmare.md +1305 -0
  47. package/docs/helpers/OpenAI.md +70 -0
  48. package/docs/helpers/Playwright.md +2759 -0
  49. package/docs/helpers/Polly.md +44 -0
  50. package/docs/helpers/Protractor.md +1769 -0
  51. package/docs/helpers/Puppeteer-firefox.md +86 -0
  52. package/docs/helpers/Puppeteer.md +2317 -0
  53. package/docs/helpers/REST.md +218 -0
  54. package/docs/helpers/TestCafe.md +1321 -0
  55. package/docs/helpers/WebDriver.md +2547 -0
  56. package/docs/hooks.md +340 -0
  57. package/docs/index.md +111 -0
  58. package/docs/installation.md +75 -0
  59. package/docs/internal-api.md +266 -0
  60. package/docs/locators.md +339 -0
  61. package/docs/mobile-react-native-locators.md +67 -0
  62. package/docs/mobile.md +338 -0
  63. package/docs/pageobjects.md +291 -0
  64. package/docs/parallel.md +400 -0
  65. package/docs/playwright.md +632 -0
  66. package/docs/plugins.md +1259 -0
  67. package/docs/puppeteer.md +316 -0
  68. package/docs/quickstart.md +162 -0
  69. package/docs/react.md +70 -0
  70. package/docs/reports.md +392 -0
  71. package/docs/secrets.md +36 -0
  72. package/docs/shadow.md +68 -0
  73. package/docs/shared/keys.mustache +31 -0
  74. package/docs/shared/react.mustache +1 -0
  75. package/docs/testcafe.md +174 -0
  76. package/docs/translation.md +247 -0
  77. package/docs/tutorial.md +271 -0
  78. package/docs/typescript.md +180 -0
  79. package/docs/ui.md +59 -0
  80. package/docs/videos.md +28 -0
  81. package/docs/visual.md +202 -0
  82. package/docs/vue.md +143 -0
  83. package/docs/webapi/amOnPage.mustache +11 -0
  84. package/docs/webapi/appendField.mustache +11 -0
  85. package/docs/webapi/attachFile.mustache +12 -0
  86. package/docs/webapi/blur.mustache +18 -0
  87. package/docs/webapi/checkOption.mustache +13 -0
  88. package/docs/webapi/clearCookie.mustache +9 -0
  89. package/docs/webapi/clearField.mustache +9 -0
  90. package/docs/webapi/click.mustache +25 -0
  91. package/docs/webapi/clickLink.mustache +8 -0
  92. package/docs/webapi/closeCurrentTab.mustache +7 -0
  93. package/docs/webapi/closeOtherTabs.mustache +8 -0
  94. package/docs/webapi/dontSee.mustache +11 -0
  95. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +10 -0
  96. package/docs/webapi/dontSeeCookie.mustache +8 -0
  97. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +10 -0
  98. package/docs/webapi/dontSeeElement.mustache +8 -0
  99. package/docs/webapi/dontSeeElementInDOM.mustache +8 -0
  100. package/docs/webapi/dontSeeInCurrentUrl.mustache +4 -0
  101. package/docs/webapi/dontSeeInField.mustache +11 -0
  102. package/docs/webapi/dontSeeInSource.mustache +8 -0
  103. package/docs/webapi/dontSeeInTitle.mustache +8 -0
  104. package/docs/webapi/doubleClick.mustache +13 -0
  105. package/docs/webapi/downloadFile.mustache +12 -0
  106. package/docs/webapi/dragAndDrop.mustache +9 -0
  107. package/docs/webapi/dragSlider.mustache +11 -0
  108. package/docs/webapi/executeAsyncScript.mustache +24 -0
  109. package/docs/webapi/executeScript.mustache +26 -0
  110. package/docs/webapi/fillField.mustache +16 -0
  111. package/docs/webapi/focus.mustache +13 -0
  112. package/docs/webapi/forceClick.mustache +28 -0
  113. package/docs/webapi/forceRightClick.mustache +18 -0
  114. package/docs/webapi/grabAllWindowHandles.mustache +7 -0
  115. package/docs/webapi/grabAttributeFrom.mustache +10 -0
  116. package/docs/webapi/grabAttributeFromAll.mustache +9 -0
  117. package/docs/webapi/grabBrowserLogs.mustache +9 -0
  118. package/docs/webapi/grabCookie.mustache +11 -0
  119. package/docs/webapi/grabCssPropertyFrom.mustache +11 -0
  120. package/docs/webapi/grabCssPropertyFromAll.mustache +10 -0
  121. package/docs/webapi/grabCurrentUrl.mustache +9 -0
  122. package/docs/webapi/grabCurrentWindowHandle.mustache +6 -0
  123. package/docs/webapi/grabDataFromPerformanceTiming.mustache +20 -0
  124. package/docs/webapi/grabElementBoundingRect.mustache +20 -0
  125. package/docs/webapi/grabGeoLocation.mustache +8 -0
  126. package/docs/webapi/grabHTMLFrom.mustache +10 -0
  127. package/docs/webapi/grabHTMLFromAll.mustache +9 -0
  128. package/docs/webapi/grabNumberOfOpenTabs.mustache +8 -0
  129. package/docs/webapi/grabNumberOfVisibleElements.mustache +9 -0
  130. package/docs/webapi/grabPageScrollPosition.mustache +8 -0
  131. package/docs/webapi/grabPopupText.mustache +5 -0
  132. package/docs/webapi/grabSource.mustache +8 -0
  133. package/docs/webapi/grabTextFrom.mustache +10 -0
  134. package/docs/webapi/grabTextFromAll.mustache +9 -0
  135. package/docs/webapi/grabTitle.mustache +8 -0
  136. package/docs/webapi/grabValueFrom.mustache +9 -0
  137. package/docs/webapi/grabValueFromAll.mustache +8 -0
  138. package/docs/webapi/grabWebElement.mustache +9 -0
  139. package/docs/webapi/grabWebElements.mustache +9 -0
  140. package/docs/webapi/moveCursorTo.mustache +12 -0
  141. package/docs/webapi/openNewTab.mustache +7 -0
  142. package/docs/webapi/pressKey.mustache +12 -0
  143. package/docs/webapi/pressKeyDown.mustache +12 -0
  144. package/docs/webapi/pressKeyUp.mustache +12 -0
  145. package/docs/webapi/pressKeyWithKeyNormalization.mustache +60 -0
  146. package/docs/webapi/refreshPage.mustache +6 -0
  147. package/docs/webapi/resizeWindow.mustache +6 -0
  148. package/docs/webapi/rightClick.mustache +14 -0
  149. package/docs/webapi/saveElementScreenshot.mustache +10 -0
  150. package/docs/webapi/saveScreenshot.mustache +12 -0
  151. package/docs/webapi/say.mustache +10 -0
  152. package/docs/webapi/scrollIntoView.mustache +11 -0
  153. package/docs/webapi/scrollPageToBottom.mustache +6 -0
  154. package/docs/webapi/scrollPageToTop.mustache +6 -0
  155. package/docs/webapi/scrollTo.mustache +12 -0
  156. package/docs/webapi/see.mustache +11 -0
  157. package/docs/webapi/seeAttributesOnElements.mustache +9 -0
  158. package/docs/webapi/seeCheckboxIsChecked.mustache +10 -0
  159. package/docs/webapi/seeCookie.mustache +8 -0
  160. package/docs/webapi/seeCssPropertiesOnElements.mustache +9 -0
  161. package/docs/webapi/seeCurrentUrlEquals.mustache +11 -0
  162. package/docs/webapi/seeElement.mustache +8 -0
  163. package/docs/webapi/seeElementInDOM.mustache +8 -0
  164. package/docs/webapi/seeInCurrentUrl.mustache +8 -0
  165. package/docs/webapi/seeInField.mustache +12 -0
  166. package/docs/webapi/seeInPopup.mustache +8 -0
  167. package/docs/webapi/seeInSource.mustache +7 -0
  168. package/docs/webapi/seeInTitle.mustache +8 -0
  169. package/docs/webapi/seeNumberOfElements.mustache +11 -0
  170. package/docs/webapi/seeNumberOfVisibleElements.mustache +10 -0
  171. package/docs/webapi/seeTextEquals.mustache +9 -0
  172. package/docs/webapi/seeTitleEquals.mustache +8 -0
  173. package/docs/webapi/selectOption.mustache +21 -0
  174. package/docs/webapi/setCookie.mustache +16 -0
  175. package/docs/webapi/setGeoLocation.mustache +12 -0
  176. package/docs/webapi/switchTo.mustache +9 -0
  177. package/docs/webapi/switchToNextTab.mustache +10 -0
  178. package/docs/webapi/switchToPreviousTab.mustache +10 -0
  179. package/docs/webapi/type.mustache +21 -0
  180. package/docs/webapi/uncheckOption.mustache +13 -0
  181. package/docs/webapi/wait.mustache +8 -0
  182. package/docs/webapi/waitForClickable.mustache +11 -0
  183. package/docs/webapi/waitForDetached.mustache +10 -0
  184. package/docs/webapi/waitForElement.mustache +11 -0
  185. package/docs/webapi/waitForEnabled.mustache +6 -0
  186. package/docs/webapi/waitForFunction.mustache +17 -0
  187. package/docs/webapi/waitForInvisible.mustache +10 -0
  188. package/docs/webapi/waitForNumberOfTabs.mustache +9 -0
  189. package/docs/webapi/waitForText.mustache +13 -0
  190. package/docs/webapi/waitForValue.mustache +10 -0
  191. package/docs/webapi/waitForVisible.mustache +10 -0
  192. package/docs/webapi/waitInUrl.mustache +9 -0
  193. package/docs/webapi/waitNumberOfVisibleElements.mustache +10 -0
  194. package/docs/webapi/waitToHide.mustache +10 -0
  195. package/docs/webapi/waitUrlEquals.mustache +10 -0
  196. package/docs/webdriver.md +701 -0
  197. package/docs/wiki/Books-&-Posts.md +27 -0
  198. package/docs/wiki/Community-Helpers-&-Plugins.md +53 -0
  199. package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +61 -0
  200. package/docs/wiki/Examples.md +145 -0
  201. package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +68 -0
  202. package/docs/wiki/Home.md +16 -0
  203. package/docs/wiki/Migration-to-Appium-v2---CodeceptJS.md +83 -0
  204. package/docs/wiki/Release-Process.md +24 -0
  205. package/docs/wiki/Roadmap.md +23 -0
  206. package/docs/wiki/Tests.md +1393 -0
  207. package/docs/wiki/Upgrading-to-CodeceptJS-3.md +153 -0
  208. package/docs/wiki/Videos.md +19 -0
  209. package/lib/css2xpath/js/css_to_xpath.js +20 -0
  210. package/lib/css2xpath/js/expression.js +23 -0
  211. package/lib/css2xpath/js/renderer.js +239 -0
  212. package/lib/locator.js +15 -1
  213. package/package.json +12 -9
@@ -0,0 +1,1769 @@
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 &lt; 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]&lt;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]&lt;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]&lt;[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]&lt;[Array][14]&lt;[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]&lt;[Array][14]&lt;[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]&lt;[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]&lt;[Array][14]&lt;[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]&lt;[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]&lt;[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]&lt;[Array][14]&lt;[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]&lt;[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]&lt;[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]&lt;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]&lt;[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]&lt;[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]&lt;[Array][14]&lt;[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]&lt;[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]&lt;[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]&lt;[Array][14]&lt;[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]&lt;[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 &amp; 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]&lt;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]&lt;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]&lt;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