codeceptjs 2.1.3 → 2.2.1

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 (173) hide show
  1. package/CHANGELOG.md +125 -37
  2. package/README.md +15 -22
  3. package/bin/codecept.js +4 -1
  4. package/docs/acceptance.md +44 -1
  5. package/docs/advanced.md +1 -1
  6. package/docs/angular.md +6 -9
  7. package/docs/basics.md +388 -75
  8. package/docs/bdd.md +4 -3
  9. package/docs/best.md +1 -1
  10. package/docs/books.md +31 -0
  11. package/docs/build/Appium.js +215 -176
  12. package/docs/build/Nightmare.js +618 -489
  13. package/docs/build/Polly.js +189 -0
  14. package/docs/build/Protractor.js +747 -608
  15. package/docs/build/Puppeteer.js +914 -633
  16. package/docs/build/REST.js +1 -1
  17. package/docs/build/TestCafe.js +1835 -0
  18. package/docs/build/WebDriver.js +861 -805
  19. package/docs/build/WebDriverIO.js +616 -617
  20. package/docs/changelog.md +410 -316
  21. package/docs/commands.md +6 -6
  22. package/docs/community-helpers.md +2 -0
  23. package/docs/detox.md +235 -0
  24. package/docs/examples.md +23 -0
  25. package/docs/helpers/ApiDataFactory.md +11 -10
  26. package/docs/helpers/Appium.md +130 -61
  27. package/docs/helpers/Detox.md +579 -0
  28. package/docs/helpers/FileSystem.md +2 -1
  29. package/docs/helpers/Mochawesome.md +1 -0
  30. package/docs/helpers/Nightmare.md +348 -128
  31. package/docs/helpers/Polly.md +85 -0
  32. package/docs/helpers/Protractor.md +451 -184
  33. package/docs/helpers/Puppeteer-firefox.md +55 -0
  34. package/docs/helpers/Puppeteer.md +619 -183
  35. package/docs/helpers/REST.md +17 -16
  36. package/docs/helpers/SeleniumWebdriver.md +9 -8
  37. package/docs/helpers/TestCafe.md +1168 -0
  38. package/docs/helpers/WebDriver.md +600 -291
  39. package/docs/helpers/WebDriverIO.md +393 -278
  40. package/docs/helpers.md +37 -18
  41. package/docs/locators.md +2 -0
  42. package/docs/mobile-react-native-locators.md +64 -0
  43. package/docs/mobile.md +5 -0
  44. package/docs/plugins.md +54 -13
  45. package/docs/puppeteer.md +74 -26
  46. package/docs/quickstart.md +47 -12
  47. package/docs/react.md +67 -0
  48. package/docs/reports.md +1 -1
  49. package/docs/{webapi/_keys.mustache → shared/keys.mustache} +0 -0
  50. package/docs/shared/react.mustache +1 -0
  51. package/docs/testcafe.md +157 -0
  52. package/docs/videos.md +19 -0
  53. package/docs/webapi/amOnPage.mustache +1 -1
  54. package/docs/webapi/appendField.mustache +2 -2
  55. package/docs/webapi/attachFile.mustache +2 -2
  56. package/docs/webapi/checkOption.mustache +2 -2
  57. package/docs/webapi/clearCookie.mustache +1 -1
  58. package/docs/webapi/clearField.mustache +1 -1
  59. package/docs/webapi/click.mustache +2 -2
  60. package/docs/webapi/clickLink.mustache +3 -3
  61. package/docs/webapi/dontSee.mustache +6 -3
  62. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +7 -1
  63. package/docs/webapi/dontSeeCookie.mustache +5 -1
  64. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +6 -1
  65. package/docs/webapi/dontSeeElement.mustache +5 -1
  66. package/docs/webapi/dontSeeElementInDOM.mustache +5 -1
  67. package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
  68. package/docs/webapi/dontSeeInField.mustache +7 -2
  69. package/docs/webapi/dontSeeInSource.mustache +5 -1
  70. package/docs/webapi/dontSeeInTitle.mustache +5 -1
  71. package/docs/webapi/doubleClick.mustache +2 -2
  72. package/docs/webapi/downloadFile.mustache +2 -2
  73. package/docs/webapi/dragAndDrop.mustache +2 -2
  74. package/docs/webapi/dragSlider.mustache +2 -2
  75. package/docs/webapi/executeAsyncScript.mustache +1 -1
  76. package/docs/webapi/executeScript.mustache +1 -1
  77. package/docs/webapi/fillField.mustache +2 -2
  78. package/docs/webapi/grabAttributeFrom.mustache +3 -2
  79. package/docs/webapi/grabBrowserLogs.mustache +3 -1
  80. package/docs/webapi/grabCookie.mustache +2 -1
  81. package/docs/webapi/grabCssPropertyFrom.mustache +3 -2
  82. package/docs/webapi/grabCurrentUrl.mustache +3 -1
  83. package/docs/webapi/grabDataFromPerformanceTiming.mustache +19 -0
  84. package/docs/webapi/grabHTMLFrom.mustache +2 -1
  85. package/docs/webapi/grabNumberOfOpenTabs.mustache +4 -2
  86. package/docs/webapi/grabNumberOfVisibleElements.mustache +3 -2
  87. package/docs/webapi/grabPageScrollPosition.mustache +3 -1
  88. package/docs/webapi/grabSource.mustache +3 -1
  89. package/docs/webapi/grabTextFrom.mustache +2 -1
  90. package/docs/webapi/grabTitle.mustache +3 -1
  91. package/docs/webapi/grabValueFrom.mustache +2 -1
  92. package/docs/webapi/moveCursorTo.mustache +3 -3
  93. package/docs/webapi/pressKey.mustache +1 -1
  94. package/docs/webapi/resizeWindow.mustache +2 -2
  95. package/docs/webapi/rightClick.mustache +2 -2
  96. package/docs/webapi/saveScreenshot.mustache +3 -3
  97. package/docs/webapi/say.mustache +2 -2
  98. package/docs/webapi/scrollPageToBottom.mustache +1 -1
  99. package/docs/webapi/scrollPageToTop.mustache +1 -1
  100. package/docs/webapi/scrollTo.mustache +3 -3
  101. package/docs/webapi/see.mustache +2 -2
  102. package/docs/webapi/seeAttributesOnElements.mustache +3 -3
  103. package/docs/webapi/seeCheckboxIsChecked.mustache +2 -1
  104. package/docs/webapi/seeCookie.mustache +1 -1
  105. package/docs/webapi/seeCssPropertiesOnElements.mustache +2 -2
  106. package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
  107. package/docs/webapi/seeElement.mustache +1 -1
  108. package/docs/webapi/seeElementInDOM.mustache +1 -1
  109. package/docs/webapi/seeInCurrentUrl.mustache +1 -1
  110. package/docs/webapi/seeInField.mustache +2 -2
  111. package/docs/webapi/seeInSource.mustache +1 -1
  112. package/docs/webapi/seeInTitle.mustache +5 -1
  113. package/docs/webapi/seeNumberOfElements.mustache +10 -0
  114. package/docs/webapi/seeNumberOfVisibleElements.mustache +2 -2
  115. package/docs/webapi/selectOption.mustache +2 -2
  116. package/docs/webapi/setCookie.mustache +1 -1
  117. package/docs/webapi/switchTo.mustache +6 -1
  118. package/docs/webapi/uncheckOption.mustache +2 -2
  119. package/docs/webapi/wait.mustache +1 -2
  120. package/docs/webapi/waitForDetached.mustache +3 -3
  121. package/docs/webapi/waitForElement.mustache +2 -2
  122. package/docs/webapi/waitForEnabled.mustache +1 -1
  123. package/docs/webapi/waitForFunction.mustache +3 -3
  124. package/docs/webapi/waitForInvisible.mustache +3 -3
  125. package/docs/webapi/waitForText.mustache +3 -3
  126. package/docs/webapi/waitForValue.mustache +3 -3
  127. package/docs/webapi/waitForVisible.mustache +3 -3
  128. package/docs/webapi/waitInUrl.mustache +2 -2
  129. package/docs/webapi/waitNumberOfVisibleElements.mustache +3 -3
  130. package/docs/webapi/waitToHide.mustache +3 -3
  131. package/docs/webapi/waitUntil.mustache +3 -3
  132. package/docs/webapi/waitUrlEquals.mustache +2 -2
  133. package/docs/webdriver.md +453 -0
  134. package/lib/codecept.js +11 -9
  135. package/lib/command/definitions.js +183 -30
  136. package/lib/command/gherkin/snippets.js +29 -9
  137. package/lib/command/init.js +31 -9
  138. package/lib/command/run-multiple.js +46 -59
  139. package/lib/command/utils.js +1 -1
  140. package/lib/container.js +30 -4
  141. package/lib/data/dataScenarioConfig.js +18 -0
  142. package/lib/helper/Appium.js +24 -24
  143. package/lib/helper/Nightmare.js +81 -84
  144. package/lib/helper/Polly.js +189 -0
  145. package/lib/helper/Protractor.js +96 -86
  146. package/lib/helper/Puppeteer.js +238 -113
  147. package/lib/helper/REST.js +1 -1
  148. package/lib/helper/TestCafe.js +1257 -0
  149. package/lib/helper/WebDriver.js +217 -277
  150. package/lib/helper/WebDriverIO.js +75 -75
  151. package/lib/helper/clientscripts/nightmare.js +8 -0
  152. package/lib/helper/extras/React.js +55 -0
  153. package/lib/helper/testcafe/testControllerHolder.js +42 -0
  154. package/lib/helper/testcafe/testcafe-utils.js +63 -0
  155. package/lib/history.js +39 -0
  156. package/lib/hooks.js +25 -1
  157. package/lib/interfaces/gherkin.js +17 -1
  158. package/lib/interfaces/scenarioConfig.js +2 -2
  159. package/lib/listener/config.js +3 -3
  160. package/lib/locator.js +6 -0
  161. package/lib/pause.js +22 -1
  162. package/lib/plugin/allure.js +63 -0
  163. package/lib/plugin/autoLogin.js +65 -16
  164. package/lib/plugin/puppeteerCoverage.js +6 -1
  165. package/lib/plugin/stepByStepReport.js +4 -3
  166. package/lib/scenario.js +23 -17
  167. package/lib/step.js +5 -2
  168. package/lib/ui.js +1 -1
  169. package/lib/utils.js +70 -20
  170. package/package.json +20 -19
  171. package/translations/de-DE.js +69 -0
  172. package/translations/index.js +1 -0
  173. package/docs/video.md +0 -26
@@ -2,11 +2,12 @@
2
2
  id: Appium
3
3
  title: Appium
4
4
  ---
5
+
5
6
  <!-- Generated by documentation.js. Update this documentation by updating the source code. -->
6
7
 
7
8
  ## Appium
8
9
 
9
- **Extends Webdriver**
10
+ Extends Webdriver
10
11
 
11
12
  Appium helper extends [Webriver][1] helper.
12
13
  It supports all browser methods and also includes special methods for mobile apps testing.
@@ -96,8 +97,10 @@ I.appendField('#myTextField', 'appended');
96
97
 
97
98
  #### Parameters
98
99
 
99
- - `field` located by label|name|CSS|XPath|strict locator
100
- - `value` text value to append.
100
+ - `field` ([string][4] \| [object][5]) located by label|name|CSS|XPath|strict locator
101
+ - `value` [string][4] text value to append.
102
+
103
+
101
104
 
102
105
  ### checkOption
103
106
 
@@ -114,8 +117,10 @@ I.checkOption('agree', '//form');
114
117
 
115
118
  #### Parameters
116
119
 
117
- - `field` checkbox located by label | name | CSS | XPath | strict locator.
118
- - `context` (optional) element located by CSS | XPath | strict locator.
120
+ - `field` ([string][4] \| [object][5]) checkbox located by label | name | CSS | XPath | strict locator.
121
+ - `context` [string][4] (optional, `null` by default) element located by CSS | XPath | strict locator.
122
+
123
+
119
124
 
120
125
  ### click
121
126
 
@@ -134,7 +139,7 @@ I.click('Submit');
134
139
  // CSS button
135
140
  I.click('#form input[type=submit]');
136
141
  // XPath
137
- I.click('//form/*[@type=submit]');
142
+ I.click('//form/[@type=submit]');
138
143
  // link in context
139
144
  I.click('Logout', '#nav');
140
145
  // using strict locator
@@ -143,8 +148,10 @@ I.click({css: 'nav a.login'});
143
148
 
144
149
  #### Parameters
145
150
 
146
- - `locator` clickable link or button located by text, or any element located by CSS|XPath|strict locator.
147
- - `context` (optional) element to search in CSS|XPath|Strict locator.
151
+ - `locator` ([string][4] \| [object][5]) clickable link or button located by text, or any element located by CSS|XPath|strict locator.
152
+ - `context` ([string][4] \| [object][5]) (optional, `null` by default) element to search in CSS|XPath|Strict locator.
153
+
154
+
148
155
 
149
156
  ### closeApp
150
157
 
@@ -162,40 +169,62 @@ Opposite to `see`. Checks that a text is not present on a page.
162
169
  Use context parameter to narrow down the search.
163
170
 
164
171
  ```js
165
- I.dontSee('Login'); // assume we are already logged in
172
+ I.dontSee('Login'); // assume we are already logged in.
173
+ I.dontSee('Login', '.nav'); // no login inside .nav element
166
174
  ```
167
175
 
168
176
  #### Parameters
169
177
 
170
- - `text` is not present.
171
- - `context` (optional) element located by CSS|XPath|strict locator in which to perfrom search.
178
+ - `text` [string][4] which is not present.
179
+ - `context` ([string][4] \| [object][5]) (optional) element located by CSS|XPath|strict locator in which to perfrom search.
180
+
172
181
 
173
182
  ### dontSeeCheckboxIsChecked
174
183
 
175
184
  Verifies that the specified checkbox is not checked.
176
185
 
186
+ ```js
187
+ I.dontSeeeCheckboxIsChedcked('#agree'); // located by ID
188
+ I.dontSeeeCheckboxIsChedcked('I agree to terms'); // located by label
189
+ I.dontSeeeCheckboxIsChedcked('agree'); // located by name
190
+ ```
191
+
177
192
  #### Parameters
178
193
 
179
- - `field` located by label|name|CSS|XPath|strict locator.
194
+ - `field` ([string][4] \| [object][5]) located by label|name|CSS|XPath|strict locator.
195
+
196
+
180
197
 
181
198
  ### dontSeeElement
182
199
 
183
200
  Opposite to `seeElement`. Checks that element is not visible (or in DOM)
184
201
 
202
+ ```js
203
+ I.dontSeeElement('.modal'); // modal is not shown
204
+ ```
205
+
185
206
  #### Parameters
186
207
 
187
- - `locator` located by CSS|XPath|Strict locator.
188
- - `context`
208
+ - `locator` ([string][4] \| [object][5]) located by CSS|XPath|Strict locator.
209
+
210
+
189
211
 
190
212
  ### dontSeeInField
191
213
 
192
214
  Checks that value of input field or textare doesn't equal to given value
193
215
  Opposite to `seeInField`.
194
216
 
217
+ ```js
218
+ I.dontSeeInField('email', 'user@user.com'); // field by name
219
+ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
220
+ ```
221
+
195
222
  #### Parameters
196
223
 
197
- - `field` located by label|name|CSS|XPath|strict locator.
198
- - `value` value to check.
224
+ - `field` ([string][4] \| [object][5]) located by label|name|CSS|XPath|strict locator.
225
+ - `value` [string][4] value to check.
226
+
227
+
199
228
 
200
229
  ### fillField
201
230
 
@@ -215,8 +244,10 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
215
244
 
216
245
  #### Parameters
217
246
 
218
- - `field` located by label|name|CSS|XPath|strict locator.
219
- - `value` text value to fill.
247
+ - `field` ([string][4] \| [object][5]) located by label|name|CSS|XPath|strict locator.
248
+ - `value` [string][4] text value to fill.
249
+
250
+
220
251
 
221
252
  ### grabAllContexts
222
253
 
@@ -281,7 +312,7 @@ Appium: support Android and iOS
281
312
  ### grabTextFrom
282
313
 
283
314
  Retrieves a text from an element located by CSS or XPath and returns it to test.
284
- Resumes test execution, so **should be used inside async with `await`** operator.
315
+ Resumes test execution, so should be used inside async with `await` operator.
285
316
 
286
317
  ```js
287
318
  let pin = await I.grabTextFrom('#pin');
@@ -293,10 +324,14 @@ If multiple elements found returns an array of texts.
293
324
 
294
325
  - `locator` element located by CSS|XPath|strict locator.
295
326
 
327
+ Returns [Promise][6]&lt;[string][4]> attribute value
328
+
329
+
330
+
296
331
  ### grabValueFrom
297
332
 
298
333
  Retrieves a value from a form element located by CSS or XPath and returns it to test.
299
- Resumes test execution, so **should be used inside async function with `await`** operator.
334
+ Resumes test execution, so should be used inside async function with `await` operator.
300
335
 
301
336
  ```js
302
337
  let email = await I.grabValueFrom('input[name=email]');
@@ -304,7 +339,11 @@ let email = await I.grabValueFrom('input[name=email]');
304
339
 
305
340
  #### Parameters
306
341
 
307
- - `locator` field located by label|name|CSS|XPath|strict locator.
342
+ - `locator` ([string][4] \| [object][5]) field located by label|name|CSS|XPath|strict locator.
343
+
344
+ Returns [Promise][6]&lt;[string][4]> attribute value
345
+
346
+
308
347
 
309
348
  ### hideDeviceKeyboard
310
349
 
@@ -342,7 +381,7 @@ The Touch Action API provides the basis of all gestures that can be
342
381
  automated in Appium. At its core is the ability to chain together ad hoc
343
382
  individual actions, which will then be applied to an element in the
344
383
  application on the device.
345
- [See complete documentation][4]
384
+ [See complete documentation][7]
346
385
 
347
386
  ```js
348
387
  I.makeTouchAction("~buttonStartWebviewCD", 'tap');
@@ -416,7 +455,7 @@ Perform a rotation gesture centered on the specified element.
416
455
  I.rotate(120, 120)
417
456
  ```
418
457
 
419
- See corresponding [webdriverio reference][5].
458
+ See corresponding [webdriverio reference][8].
420
459
 
421
460
  Appium: support only iOS
422
461
 
@@ -442,7 +481,7 @@ I.runInWeb(() => {
442
481
 
443
482
  #### Parameters
444
483
 
445
- - `fn` **any**
484
+ - `fn` any
446
485
 
447
486
  ### runOnAndroid
448
487
 
@@ -477,8 +516,8 @@ I.runOnAndroid((caps) => {
477
516
 
478
517
  #### Parameters
479
518
 
480
- - `caps` **any**
481
- - `fn` **any**
519
+ - `caps` any
520
+ - `fn` any
482
521
 
483
522
  ### runOnIOS
484
523
 
@@ -513,8 +552,8 @@ I.runOnAndroid((caps) => {
513
552
 
514
553
  #### Parameters
515
554
 
516
- - `caps` **any**
517
- - `fn` **any**
555
+ - `caps` any
556
+ - `fn` any
518
557
 
519
558
  ### see
520
559
 
@@ -529,8 +568,10 @@ I.see('Register', {css: 'form.register'}); // use strict locator
529
568
 
530
569
  #### Parameters
531
570
 
532
- - `text` expected on page.
533
- - `context` (optional) element located by CSS|Xpath|strict locator in which to search for text.
571
+ - `text` [string][4] expected on page.
572
+ - `context` ([string][4] \| [object][5]) (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
573
+
574
+
534
575
 
535
576
  ### seeAppIsInstalled
536
577
 
@@ -568,7 +609,9 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
568
609
 
569
610
  #### Parameters
570
611
 
571
- - `field` located by label|name|CSS|XPath|strict locator.
612
+ - `field` ([string][4] \| [object][5]) located by label|name|CSS|XPath|strict locator.
613
+
614
+
572
615
 
573
616
  ### seeCurrentActivityIs
574
617
 
@@ -615,7 +658,9 @@ I.seeElement('#modal');
615
658
 
616
659
  #### Parameters
617
660
 
618
- - `locator` located by CSS|XPath|strict locator.
661
+ - `locator` ([string][4] \| [object][5]) located by CSS|XPath|strict locator.
662
+
663
+
619
664
 
620
665
  ### seeInField
621
666
 
@@ -631,8 +676,10 @@ I.seeInField('#searchform input','Search');
631
676
 
632
677
  #### Parameters
633
678
 
634
- - `field` located by label|name|CSS|XPath|strict locator.
635
- - `value` value to check.
679
+ - `field` ([string][4] \| [object][5]) located by label|name|CSS|XPath|strict locator.
680
+ - `value` [string][4] value to check.
681
+
682
+
636
683
 
637
684
  ### seeOrientationIs
638
685
 
@@ -670,13 +717,15 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
670
717
 
671
718
  #### Parameters
672
719
 
673
- - `select` field located by label|name|CSS|XPath|strict locator.
674
- - `option` visible text or value of option.- Supported on only for web testing!
720
+ - `select` ([string][4] \| [object][5]) field located by label|name|CSS|XPath|strict locator.
721
+ - `option` ([string][4] \| [array][9]) visible text or value of option.
722
+
723
+ - Supported on only for web testing!
675
724
 
676
725
  ### sendDeviceKeyEvent
677
726
 
678
727
  Send a key event to the device.
679
- List of keys: [https://developer.android.com/reference/android/view/KeyEvent.html][6]
728
+ List of keys: [https://developer.android.com/reference/android/view/KeyEvent.html][10]
680
729
 
681
730
  ```js
682
731
  I.sendDeviceKeyEvent(3);
@@ -690,7 +739,7 @@ I.sendDeviceKeyEvent(3);
690
739
 
691
740
  Set immediate value in app.
692
741
 
693
- See corresponding [webdriverio reference][7].
742
+ See corresponding [webdriverio reference][11].
694
743
 
695
744
  Appium: support only iOS
696
745
 
@@ -715,7 +764,7 @@ I.setNetworkConnection(4) // airplane mode off, wifi off, data on
715
764
  I.setNetworkConnection(6) // airplane mode off, wifi on, data on
716
765
  ```
717
766
 
718
- See corresponding [webdriverio reference][8].
767
+ See corresponding [webdriverio reference][12].
719
768
 
720
769
  Appium: support only Android
721
770
 
@@ -799,7 +848,7 @@ let locator = "#io.selendroid.testapp:id/LinearLayout1";
799
848
  I.swipe(locator, 800, 1200, 1000);
800
849
  ```
801
850
 
802
- [See complete reference][9]
851
+ [See complete reference][13]
803
852
 
804
853
  #### Parameters
805
854
 
@@ -913,7 +962,7 @@ I.switchToNative('SOME_OTHER_CONTEXT');
913
962
 
914
963
  #### Parameters
915
964
 
916
- - `context` **any** (optional, default `null`)
965
+ - `context` any
917
966
 
918
967
  ### switchToWeb
919
968
 
@@ -930,7 +979,7 @@ I.switchToWeb('WEBVIEW_io.selendroid.testapp');
930
979
 
931
980
  #### Parameters
932
981
 
933
- - `context` **[string][10]?**
982
+ - `context` [string][4]?
934
983
 
935
984
  ### tap
936
985
 
@@ -944,7 +993,7 @@ Shortcut for `makeTouchAction`
944
993
 
945
994
  #### Parameters
946
995
 
947
- - `locator` **any**
996
+ - `locator` any
948
997
 
949
998
  ### touchPerform
950
999
 
@@ -989,20 +1038,26 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
989
1038
 
990
1039
  #### Parameters
991
1040
 
992
- - `locator` element located by CSS|XPath|strict locator.
993
- - `sec` (optional) time in seconds to wait, 1 by default.
1041
+ - `locator` ([string][4] \| [object][5]) element located by CSS|XPath|strict locator.
1042
+ - `sec` [number][14] (optional, `1` by default) time in seconds to wait
1043
+
1044
+
994
1045
 
995
1046
  ### waitForInvisible
996
1047
 
997
1048
  Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
998
1049
  Element can be located by CSS or XPath.
999
1050
 
1000
- I.waitForInvisible('#popup');
1051
+ ```js
1052
+ I.waitForInvisible('#popup');
1053
+ ```
1001
1054
 
1002
1055
  #### Parameters
1003
1056
 
1004
- - `locator` element located by CSS|XPath|strict locator.
1005
- - `sec` (optional) time in seconds to wait, 1 by default.
1057
+ - `locator` ([string][4] \| [object][5]) element located by CSS|XPath|strict locator.
1058
+ - `sec` [number][14] (optional, `1` by default) time in seconds to wait
1059
+
1060
+
1006
1061
 
1007
1062
  ### waitForText
1008
1063
 
@@ -1017,21 +1072,27 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
1017
1072
 
1018
1073
  #### Parameters
1019
1074
 
1020
- - `text` to wait for.
1021
- - `sec` (optional) time in seconds to wait.
1022
- - `context` (optional) element located by CSS|XPath|strict locator.
1075
+ - `text` [string][4] to wait for.
1076
+ - `sec` [number][14] (optional, `1` by default) time in seconds to wait
1077
+ - `context` ([string][4] \| [object][5]) (optional) element located by CSS|XPath|strict locator.
1078
+
1079
+
1023
1080
 
1024
1081
  ### waitForVisible
1025
1082
 
1026
1083
  Waits for an element to become visible on a page (by default waits for 1sec).
1027
1084
  Element can be located by CSS or XPath.
1028
1085
 
1029
- I.waitForVisible('#popup');
1086
+ ```js
1087
+ I.waitForVisible('#popup');
1088
+ ```
1030
1089
 
1031
1090
  #### Parameters
1032
1091
 
1033
- - `locator` element located by CSS|XPath|strict locator.
1034
- - `sec` (optional) time in seconds to wait, 1 by default.
1092
+ - `locator` ([string][4] \| [object][5]) element located by CSS|XPath|strict locator.
1093
+ - `sec` [number][14] (optional, `1` by default) time in seconds to wait
1094
+
1095
+
1035
1096
 
1036
1097
  [1]: http://codecept.io/helpers/WebDriver/
1037
1098
 
@@ -1039,16 +1100,24 @@ Element can be located by CSS or XPath.
1039
1100
 
1040
1101
  [3]: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md
1041
1102
 
1042
- [4]: http://webdriver.io/api/mobile/touchAction.html
1103
+ [4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
1104
+
1105
+ [5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
1106
+
1107
+ [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
1108
+
1109
+ [7]: http://webdriver.io/api/mobile/touchAction.html
1110
+
1111
+ [8]: http://webdriver.io/api/mobile/rotate.html
1043
1112
 
1044
- [5]: http://webdriver.io/api/mobile/rotate.html
1113
+ [9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
1045
1114
 
1046
- [6]: https://developer.android.com/reference/android/view/KeyEvent.html
1115
+ [10]: https://developer.android.com/reference/android/view/KeyEvent.html
1047
1116
 
1048
- [7]: http://webdriver.io/api/mobile/setImmediateValue.html
1117
+ [11]: http://webdriver.io/api/mobile/setImmediateValue.html
1049
1118
 
1050
- [8]: http://webdriver.io/api/mobile/setNetworkConnection.html
1119
+ [12]: http://webdriver.io/api/mobile/setNetworkConnection.html
1051
1120
 
1052
- [9]: http://webdriver.io/api/mobile/swipe.html
1121
+ [13]: http://webdriver.io/api/mobile/swipe.html
1053
1122
 
1054
- [10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
1123
+ [14]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number