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
@@ -0,0 +1,579 @@
1
+ ---
2
+ id: Detox
3
+ title: Detox
4
+ ---
5
+
6
+ <!-- Generated by documentation.js. Update this documentation by updating the source code. -->
7
+
8
+ ## Detox
9
+
10
+ **Extends Helper**
11
+
12
+ This is a wrapper on top of [Detox][1] library, aimied to unify testing experience for CodeceptJS framework.
13
+ Detox provides a grey box testing for mobile applications, playing especially good for React Native apps.
14
+
15
+ Detox plays quite differently from Appium. To establish detox testing you need to build a mobile application in a special way to inject Detox code.
16
+ This why **Detox is grey box testing** solution, so you need an access to application source code, and a way to build and execute it on emulator.
17
+
18
+ Comparing to Appium, Detox runs faster and more stable but requires an additional setup for build.
19
+
20
+ ### Setup
21
+
22
+ 1. [Install and configure Detox for iOS][2] and [Android][3]
23
+ 2. [Build an application][4] using `detox build` command.
24
+ 3. Install [CodeceptJS][5] and detox-helper:
25
+
26
+
27
+ npm i @codeceptjs/detox-helper --save
28
+
29
+ Detox configuration is required in `package.json` under `detox` section.
30
+
31
+ If you completed step 1 and step 2 you should have a configuration similar this:
32
+
33
+ ```js
34
+ "detox": {
35
+ "configurations": {
36
+ "ios.sim.debug": {
37
+ "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/example.app",
38
+ "build": "xcodebuild -project ios/example.xcodeproj -scheme example -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
39
+ "type": "ios.simulator",
40
+ "name": "iPhone 7"
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ ### Configuration
47
+
48
+ Besides Detox configuration, CodeceptJS should also be configured to use Detox.
49
+
50
+ In `codecept.conf.js` enable Detox helper:
51
+
52
+ ```js
53
+ helpers: {
54
+ Detox: {
55
+ require: '@codeceptjs/detox',
56
+ configuration: '<detox-configuration-name>',
57
+ }
58
+ }
59
+ ```
60
+
61
+ It's important to specify a package name under `require` section and current detox configuration taken from `package.json`.
62
+
63
+ Options:
64
+
65
+ - `configuration` - a detox configuration name. Required.
66
+ - `reloadReactNative` - should be enabled for React Native applications.
67
+ - `reuse` - reuse application for tests. By default, Detox reinstalls and relaunches app.
68
+ - `registerGlobals` - (default: true) Register Detox helper functions `by`, `element`, `expect`, `waitFor` globally.
69
+
70
+ ### Parameters
71
+
72
+ - `config`
73
+
74
+ ### appendField
75
+
76
+ Appends text into the field.
77
+ A field can be located by text, accessibility id, id.
78
+
79
+ ```js
80
+ I.appendField('name', 'davert');
81
+ ```
82
+
83
+ #### Parameters
84
+
85
+ - `field` **([string][6] \| [object][7])**
86
+ - `value` **[string][6]**
87
+
88
+ ### clearField
89
+
90
+ Clears a text field.
91
+ A field can be located by text, accessibility id, id.
92
+
93
+ ```js
94
+ I.clearField('~name');
95
+ ```
96
+
97
+ #### Parameters
98
+
99
+ - `field` **([string][6] \| [object][7])** an input element to clear
100
+
101
+ ### click
102
+
103
+ Clicks on an element.
104
+ Element can be located by its text or id or accessibility id
105
+
106
+ The second parameter is a context (id | type | accessibility id) to narrow the search.
107
+
108
+ Same as [tap][8]
109
+
110
+ ```js
111
+ I.click('Login'); // locate by text
112
+ I.click('~nav-1'); // locate by accessibility label
113
+ I.click('#user'); // locate by id
114
+ I.click('Login', '#nav'); // locate by text inside #nav
115
+ I.click({ ios: 'Save', android: 'SAVE' }, '#main'); // different texts on iOS and Android
116
+ ```
117
+
118
+ #### Parameters
119
+
120
+ - `locator` **([string][6] \| [object][7])**
121
+ - `context` **([string][6] \| [object][7])** (optional, default `null`)
122
+
123
+ ### clickAtPoint
124
+
125
+ Performs click on element with horizontal and vertical offset.
126
+ An element is located by text, id, accessibility id.
127
+
128
+ ```js
129
+ I.clickAtPoint('Save', 10, 10);
130
+ I.clickAtPoint('~save', 10, 10); // locate by accessibility id
131
+ ```
132
+
133
+ #### Parameters
134
+
135
+ - `locator` **([string][6] \| [object][7])**
136
+ - `x` **int** horizontal offset (optional, default `0`)
137
+ - `y` **int** vertical offset (optional, default `0`)
138
+
139
+ ### dontSee
140
+
141
+ Checks text not to be visible.
142
+ Use second parameter to narrow down the search.
143
+
144
+ ```js
145
+ I.dontSee('Record created');
146
+ I.dontSee('Record updated', '#message');
147
+ I.dontSee('Record deleted', '~message');
148
+ ```
149
+
150
+ #### Parameters
151
+
152
+ - `text` **[string][6]** to check invisibility
153
+ - `context` **([string][6] \| [object][7])** element in which to search for text (optional, default `null`)
154
+
155
+ ### dontSeeElement
156
+
157
+ Checks that element is not visible.
158
+ Use second parameter to narrow down the search.
159
+
160
+ ```js
161
+ I.dontSeeElement('~edit'); // located by accessibility id
162
+ I.dontSeeElement('~edit', '#menu'); // element inside #menu
163
+ ```
164
+
165
+ #### Parameters
166
+
167
+ - `locator` **([string][6] \| [object][7])** element to locate
168
+ - `context` **([string][6] \| [object][7])** context element (optional, default `null`)
169
+
170
+ ### dontSeeElementExists
171
+
172
+ Checks that element not exists.
173
+ Use second parameter to narrow down the search.
174
+
175
+ ```js
176
+ I.dontSeeElementExist('~edit'); // located by accessibility id
177
+ I.dontSeeElementExist('~edit', '#menu'); // element inside #menu
178
+ ```
179
+
180
+ #### Parameters
181
+
182
+ - `locator` **([string][6] \| [object][7])** element to locate
183
+ - `context` **([string][6] \| [object][7])** context element (optional, default `null`)
184
+
185
+ ### fillField
186
+
187
+ Fills in text field in an app.
188
+ A field can be located by text, accessibility id, id.
189
+
190
+ ```js
191
+ I.fillField('Username', 'davert');
192
+ I.fillField('~name', 'davert');
193
+ I.fillField({ android: 'NAME', ios: 'name' }, 'davert');
194
+ ```
195
+
196
+ #### Parameters
197
+
198
+ - `field` **([string][6] \| [object][7])** an input element to fill in
199
+ - `value` **[string][6]** value to fill
200
+
201
+ ### goBack
202
+
203
+ Goes back on Android
204
+
205
+ ```js
206
+ I.goBack(); // on Android only
207
+ ```
208
+
209
+ ### installApp
210
+
211
+ Installs a configured application.
212
+ Application is installed by default.
213
+
214
+ ```js
215
+ I.installApp();
216
+ ```
217
+
218
+ ### launchApp
219
+
220
+ Launches an application. If application instance already exists, use [relaunchApp][9].
221
+
222
+ ```js
223
+ I.launchApp();
224
+ ```
225
+
226
+ ### longPress
227
+
228
+ Taps an element and holds for a requested time.
229
+
230
+ ```js
231
+ I.longPress('Login', 2); // locate by text, hold for 2 seconds
232
+ I.longPress('~nav', 1); // locate by accessibility label, hold for second
233
+ I.longPress('Update', 2, '#menu'); // locate by text inside #menu, hold for 2 seconds
234
+ ```
235
+
236
+ #### Parameters
237
+
238
+ - `locator` **([string][6] \| [object][7])** element to locate
239
+ - `sec` **num** number of seconds to hold tap
240
+ - `context` **([string][6] \| [object][7])** context element (optional, default `null`)
241
+
242
+ ### multiTap
243
+
244
+ Multi taps on an element.
245
+ Element can be located by its text or id or accessibility id.
246
+
247
+ Set the number of taps in second argument.
248
+ Optionally define the context element by third argument.
249
+
250
+ ```js
251
+ I.multiTap('Login', 2); // locate by text
252
+ I.multiTap('~nav', 2); // locate by accessibility label
253
+ I.multiTap('#user', 2); // locate by id
254
+ I.multiTap('Update', 2, '#menu'); // locate by id
255
+ ```
256
+
257
+ #### Parameters
258
+
259
+ - `locator` **([string][6] \| [object][7])** element to locate
260
+ - `num` **int** number of taps
261
+ - `context` **([string][6] \| [object][7])** context element (optional, default `null`)
262
+
263
+ ### relaunchApp
264
+
265
+ Relaunches an application.
266
+
267
+ ```js
268
+ I.relaunchApp();
269
+ ```
270
+
271
+ ### runOnAndroid
272
+
273
+ Execute code only on Android
274
+
275
+ ```js
276
+ I.runOnAndroid(() => {
277
+ I.click('Button');
278
+ I.see('Hi, Android');
279
+ });
280
+ ```
281
+
282
+ #### Parameters
283
+
284
+ - `fn` a function which will be executed on android
285
+
286
+ ### runOnIOS
287
+
288
+ Execute code only on iOS
289
+
290
+ ```js
291
+ I.runOnIOS(() => {
292
+ I.click('Button');
293
+ I.see('Hi, IOS');
294
+ });
295
+ ```
296
+
297
+ #### Parameters
298
+
299
+ - `fn` a function which will be executed on iOS
300
+
301
+ ### saveScreenshot
302
+
303
+ Saves a screenshot to the output dir
304
+
305
+ ```js
306
+ I.saveScreenshot('main-window.png');
307
+ ```
308
+
309
+ #### Parameters
310
+
311
+ - `name`
312
+ - `string` name
313
+
314
+ ### scrollDown
315
+
316
+ Scrolls to the bottom of an element.
317
+
318
+ ```js
319
+ I.scrollDown('#container');
320
+ ```
321
+
322
+ #### Parameters
323
+
324
+ - `locator` **([string][6] \| [object][7])**
325
+
326
+ ### scrollLeft
327
+
328
+ Scrolls to the left of an element.
329
+
330
+ ```js
331
+ I.scrollLeft('#container');
332
+ ```
333
+
334
+ #### Parameters
335
+
336
+ - `locator` **([string][6] \| [object][7])**
337
+
338
+ ### scrollRight
339
+
340
+ Scrolls to the right of an element.
341
+
342
+ ```js
343
+ I.scrollRight('#container');
344
+ ```
345
+
346
+ #### Parameters
347
+
348
+ - `locator` **([string][6] \| [object][7])**
349
+
350
+ ### scrollUp
351
+
352
+ Scrolls to the top of an element.
353
+
354
+ ```js
355
+ I.scrollUp('#container');
356
+ ```
357
+
358
+ #### Parameters
359
+
360
+ - `locator` **([string][6] \| [object][7])**
361
+
362
+ ### see
363
+
364
+ Checks text to be visible.
365
+ Use second parameter to narrow down the search.
366
+
367
+ ```js
368
+ I.see('Record created');
369
+ I.see('Record updated', '#message');
370
+ I.see('Record deleted', '~message');
371
+ ```
372
+
373
+ #### Parameters
374
+
375
+ - `text` **[string][6]** to check visibility
376
+ - `context` **([string][6] \| [object][7])** element inside which to search for text (optional, default `null`)
377
+
378
+ ### seeElement
379
+
380
+ Checks for visibility of an element.
381
+ Use second parameter to narrow down the search.
382
+
383
+ ```js
384
+ I.seeElement('~edit'); // located by accessibility id
385
+ I.seeElement('~edit', '#menu'); // element inside #menu
386
+ ```
387
+
388
+ #### Parameters
389
+
390
+ - `locator` **([string][6] \| [object][7])** element to locate
391
+ - `context` **([string][6] \| [object][7])** context element (optional, default `null`)
392
+
393
+ ### seeElementExists
394
+
395
+ Checks for existence of an element. An element can be visible or not.
396
+ Use second parameter to narrow down the search.
397
+
398
+ ```js
399
+ I.seeElementExists('~edit'); // located by accessibility id
400
+ I.seeElementExists('~edit', '#menu'); // element inside #menu
401
+ ```
402
+
403
+ #### Parameters
404
+
405
+ - `locator` **([string][6] \| [object][7])** element to locate
406
+ - `context` **([string][6] \| [object][7])** context element (optional, default `null`)
407
+
408
+ ### setLandscapeOrientation
409
+
410
+ Switches device to landscape orientation
411
+
412
+ ```js
413
+ I.setLandscapeOrientation();
414
+ ```
415
+
416
+ ### setPortraitOrientation
417
+
418
+ Switches device to portrait orientation
419
+
420
+ ```js
421
+ I.setPortraitOrientation();
422
+ ```
423
+
424
+ ### shakeDevice
425
+
426
+ Shakes the device.
427
+
428
+ ```js
429
+ I.shakeDevice();
430
+ ```
431
+
432
+ ### swipeDown
433
+
434
+ Performs a swipe up inside an element.
435
+ Can be `slow` or `fast` swipe.
436
+
437
+ ```js
438
+ I.swipeUp('#container');
439
+ ```
440
+
441
+ #### Parameters
442
+
443
+ - `locator` **([string][6] \| [object][7])** an element on which to perform swipe
444
+ - `speed` **[string][6]** a speed to perform: `slow` or `fast`. (optional, default `'slow'`)
445
+
446
+ ### swipeLeft
447
+
448
+ Performs a swipe up inside an element.
449
+ Can be `slow` or `fast` swipe.
450
+
451
+ ```js
452
+ I.swipeUp('#container');
453
+ ```
454
+
455
+ #### Parameters
456
+
457
+ - `locator` **([string][6] \| [object][7])** an element on which to perform swipe
458
+ - `speed` **[string][6]** a speed to perform: `slow` or `fast`. (optional, default `'slow'`)
459
+
460
+ ### swipeRight
461
+
462
+ Performs a swipe up inside an element.
463
+ Can be `slow` or `fast` swipe.
464
+
465
+ ```js
466
+ I.swipeUp('#container');
467
+ ```
468
+
469
+ #### Parameters
470
+
471
+ - `locator` **([string][6] \| [object][7])** an element on which to perform swipe
472
+ - `speed` **[string][6]** a speed to perform: `slow` or `fast`. (optional, default `'slow'`)
473
+
474
+ ### swipeUp
475
+
476
+ Performs a swipe up inside an element.
477
+ Can be `slow` or `fast` swipe.
478
+
479
+ ```js
480
+ I.swipeUp('#container');
481
+ ```
482
+
483
+ #### Parameters
484
+
485
+ - `locator` **([string][6] \| [object][7])** an element on which to perform swipe
486
+ - `speed` **[string][6]** a speed to perform: `slow` or `fast`. (optional, default `'slow'`)
487
+
488
+ ### tap
489
+
490
+ Taps on an element.
491
+ Element can be located by its text or id or accessibility id.
492
+
493
+ The second parameter is a context element to narrow the search.
494
+
495
+ Same as [click][10]
496
+
497
+ ```js
498
+ I.tap('Login'); // locate by text
499
+ I.tap('~nav-1'); // locate by accessibility label
500
+ I.tap('#user'); // locate by id
501
+ I.tap('Login', '#nav'); // locate by text inside #nav
502
+ I.tap({ ios: 'Save', android: 'SAVE' }, '#main'); // different texts on iOS and Android
503
+ ```
504
+
505
+ #### Parameters
506
+
507
+ - `locator` **([string][6] \| [object][7])**
508
+ - `context` **([string][6] \| [object][7])** (optional, default `null`)
509
+
510
+ ### wait
511
+
512
+ Waits for number of seconds
513
+
514
+ ```js
515
+ I.wait(2); // waits for 2 seconds
516
+ ```
517
+
518
+ #### Parameters
519
+
520
+ - `sec` **int** number of seconds to wait
521
+
522
+ ### waitForElement
523
+
524
+ Waits for an element to exist on page.
525
+
526
+ ```js
527
+ I.waitForElement('#message', 1); // wait for 1 second
528
+ ```
529
+
530
+ #### Parameters
531
+
532
+ - `locator` **([string][6] \| [object][7])** an element to wait for
533
+ - `sec` **int** number of seconds to wait, 5 by default (optional, default `5`)
534
+
535
+ ### waitForElementVisible
536
+
537
+ Waits for an element to be visible on page.
538
+
539
+ ```js
540
+ I.waitForElementVisible('#message', 1); // wait for 1 second
541
+ ```
542
+
543
+ #### Parameters
544
+
545
+ - `locator` **([string][6] \| [object][7])** an element to wait for
546
+ - `sec` **int** number of seconds to wait (optional, default `5`)
547
+
548
+ ### waitToHide
549
+
550
+ Waits an elment to become not visible.
551
+
552
+ ```js
553
+ I.waitToHide('#message', 2); // wait for 2 seconds
554
+ ```
555
+
556
+ #### Parameters
557
+
558
+ - `locator` **([string][6] \| [object][7])** an element to wait for
559
+ - `sec` **int** number of seconds to wait (optional, default `5`)
560
+
561
+ [1]: https://github.com/wix/Detox
562
+
563
+ [2]: https://github.com/wix/Detox/blob/master/docs/Introduction.GettingStarted.md
564
+
565
+ [3]: https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md
566
+
567
+ [4]: https://github.com/wix/Detox/blob/master/docs/Introduction.GettingStarted.md#step-4-build-your-app-and-run-detox-tests
568
+
569
+ [5]: https://codecept.io
570
+
571
+ [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
572
+
573
+ [7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
574
+
575
+ [8]: #tap
576
+
577
+ [9]: #relaunchApp
578
+
579
+ [10]: #click
@@ -2,11 +2,12 @@
2
2
  id: FileSystem
3
3
  title: FileSystem
4
4
  ---
5
+
5
6
  <!-- Generated by documentation.js. Update this documentation by updating the source code. -->
6
7
 
7
8
  ## FileSystem
8
9
 
9
- **Extends Helper**
10
+ Extends Helper
10
11
 
11
12
  Helper for testing filesystem.
12
13
  Can be easily used to check file structures:
@@ -2,4 +2,5 @@
2
2
  id: Mochawesome
3
3
  title: Mochawesome
4
4
  ---
5
+
5
6
  <!-- Generated by documentation.js. Update this documentation by updating the source code. -->