codeceptjs 3.3.0 → 3.3.3

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 (139) hide show
  1. package/CHANGELOG.md +50 -1
  2. package/README.md +6 -1
  3. package/docs/api.md +1 -1
  4. package/docs/bdd.md +1 -0
  5. package/docs/best.md +1 -1
  6. package/docs/build/ApiDataFactory.js +4 -3
  7. package/docs/build/Appium.js +21 -16
  8. package/docs/build/GraphQL.js +4 -2
  9. package/docs/build/GraphQLDataFactory.js +3 -3
  10. package/docs/build/JSONResponse.js +1 -1
  11. package/docs/build/Nightmare.js +54 -25
  12. package/docs/build/Playwright.js +105 -52
  13. package/docs/build/Protractor.js +72 -34
  14. package/docs/build/Puppeteer.js +80 -37
  15. package/docs/build/REST.js +5 -2
  16. package/docs/build/TestCafe.js +54 -23
  17. package/docs/build/WebDriver.js +115 -67
  18. package/docs/changelog.md +50 -1
  19. package/docs/custom-helpers.md +1 -1
  20. package/docs/data.md +2 -2
  21. package/docs/helpers/ApiDataFactory.md +7 -3
  22. package/docs/helpers/Appium.md +217 -175
  23. package/docs/helpers/GraphQL.md +6 -0
  24. package/docs/helpers/GraphQLDataFactory.md +3 -3
  25. package/docs/helpers/JSONResponse.md +1 -1
  26. package/docs/helpers/Nightmare.md +98 -45
  27. package/docs/helpers/Playwright.md +151 -59
  28. package/docs/helpers/Puppeteer.md +103 -26
  29. package/docs/helpers/REST.md +1 -1
  30. package/docs/helpers/TestCafe.md +77 -22
  31. package/docs/helpers/WebDriver.md +150 -62
  32. package/docs/index.md +1 -1
  33. package/docs/locators.md +1 -1
  34. package/docs/webapi/amOnPage.mustache +2 -1
  35. package/docs/webapi/appendField.mustache +2 -1
  36. package/docs/webapi/attachFile.mustache +2 -1
  37. package/docs/webapi/checkOption.mustache +2 -1
  38. package/docs/webapi/clearCookie.mustache +2 -1
  39. package/docs/webapi/clearField.mustache +1 -0
  40. package/docs/webapi/click.mustache +2 -1
  41. package/docs/webapi/clickLink.mustache +2 -1
  42. package/docs/webapi/closeCurrentTab.mustache +6 -4
  43. package/docs/webapi/closeOtherTabs.mustache +6 -4
  44. package/docs/webapi/dontSee.mustache +1 -0
  45. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -0
  46. package/docs/webapi/dontSeeCookie.mustache +2 -1
  47. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +2 -1
  48. package/docs/webapi/dontSeeElement.mustache +2 -1
  49. package/docs/webapi/dontSeeElementInDOM.mustache +2 -1
  50. package/docs/webapi/dontSeeInCurrentUrl.mustache +2 -1
  51. package/docs/webapi/dontSeeInField.mustache +2 -1
  52. package/docs/webapi/dontSeeInSource.mustache +1 -0
  53. package/docs/webapi/dontSeeInTitle.mustache +2 -1
  54. package/docs/webapi/doubleClick.mustache +1 -0
  55. package/docs/webapi/downloadFile.mustache +2 -1
  56. package/docs/webapi/dragAndDrop.mustache +1 -0
  57. package/docs/webapi/dragSlider.mustache +2 -1
  58. package/docs/webapi/executeAsyncScript.mustache +1 -1
  59. package/docs/webapi/executeScript.mustache +1 -1
  60. package/docs/webapi/fillField.mustache +1 -0
  61. package/docs/webapi/forceClick.mustache +1 -0
  62. package/docs/webapi/forceRightClick.mustache +1 -0
  63. package/docs/webapi/grabDataFromPerformanceTiming.mustache +2 -1
  64. package/docs/webapi/moveCursorTo.mustache +1 -0
  65. package/docs/webapi/openNewTab.mustache +6 -4
  66. package/docs/webapi/pressKey.mustache +2 -1
  67. package/docs/webapi/pressKeyDown.mustache +1 -0
  68. package/docs/webapi/pressKeyUp.mustache +1 -0
  69. package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -0
  70. package/docs/webapi/refreshPage.mustache +1 -0
  71. package/docs/webapi/resizeWindow.mustache +2 -1
  72. package/docs/webapi/rightClick.mustache +1 -0
  73. package/docs/webapi/saveElementScreenshot.mustache +1 -0
  74. package/docs/webapi/saveScreenshot.mustache +2 -1
  75. package/docs/webapi/say.mustache +2 -1
  76. package/docs/webapi/scrollIntoView.mustache +1 -0
  77. package/docs/webapi/scrollPageToBottom.mustache +1 -0
  78. package/docs/webapi/scrollPageToTop.mustache +1 -0
  79. package/docs/webapi/scrollTo.mustache +2 -1
  80. package/docs/webapi/see.mustache +2 -1
  81. package/docs/webapi/seeAttributesOnElements.mustache +2 -1
  82. package/docs/webapi/seeCheckboxIsChecked.mustache +1 -0
  83. package/docs/webapi/seeCookie.mustache +1 -0
  84. package/docs/webapi/seeCssPropertiesOnElements.mustache +2 -1
  85. package/docs/webapi/seeCurrentUrlEquals.mustache +2 -1
  86. package/docs/webapi/seeElement.mustache +2 -1
  87. package/docs/webapi/seeElementInDOM.mustache +1 -0
  88. package/docs/webapi/seeInCurrentUrl.mustache +2 -1
  89. package/docs/webapi/seeInField.mustache +1 -0
  90. package/docs/webapi/seeInPopup.mustache +1 -0
  91. package/docs/webapi/seeInSource.mustache +2 -1
  92. package/docs/webapi/seeInTitle.mustache +2 -1
  93. package/docs/webapi/seeNumberOfElements.mustache +1 -0
  94. package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -0
  95. package/docs/webapi/seeTextEquals.mustache +2 -1
  96. package/docs/webapi/seeTitleEquals.mustache +6 -5
  97. package/docs/webapi/selectOption.mustache +1 -0
  98. package/docs/webapi/setCookie.mustache +1 -0
  99. package/docs/webapi/setGeoLocation.mustache +1 -0
  100. package/docs/webapi/switchTo.mustache +2 -1
  101. package/docs/webapi/switchToNextTab.mustache +8 -7
  102. package/docs/webapi/switchToPreviousTab.mustache +8 -7
  103. package/docs/webapi/type.mustache +1 -0
  104. package/docs/webapi/uncheckOption.mustache +2 -1
  105. package/docs/webapi/wait.mustache +2 -1
  106. package/docs/webapi/waitForClickable.mustache +2 -1
  107. package/docs/webapi/waitForDetached.mustache +2 -1
  108. package/docs/webapi/waitForElement.mustache +2 -1
  109. package/docs/webapi/waitForEnabled.mustache +2 -1
  110. package/docs/webapi/waitForFunction.mustache +1 -0
  111. package/docs/webapi/waitForInvisible.mustache +2 -1
  112. package/docs/webapi/waitForText.mustache +2 -1
  113. package/docs/webapi/waitForValue.mustache +1 -0
  114. package/docs/webapi/waitForVisible.mustache +1 -0
  115. package/docs/webapi/waitInUrl.mustache +2 -1
  116. package/docs/webapi/waitNumberOfVisibleElements.mustache +2 -1
  117. package/docs/webapi/waitToHide.mustache +2 -1
  118. package/docs/webapi/waitUrlEquals.mustache +2 -1
  119. package/lib/cli.js +1 -1
  120. package/lib/command/definitions.js +9 -0
  121. package/lib/command/run-workers.js +1 -1
  122. package/lib/command/run.js +2 -2
  123. package/lib/command/workers/runTests.js +55 -0
  124. package/lib/helper/ApiDataFactory.js +4 -3
  125. package/lib/helper/Appium.js +2 -7
  126. package/lib/helper/GraphQL.js +4 -2
  127. package/lib/helper/GraphQLDataFactory.js +3 -3
  128. package/lib/helper/JSONResponse.js +1 -1
  129. package/lib/helper/Playwright.js +28 -17
  130. package/lib/helper/REST.js +5 -2
  131. package/lib/helper/WebDriver.js +4 -0
  132. package/lib/interfaces/bdd.js +5 -0
  133. package/lib/listener/steps.js +1 -0
  134. package/lib/output.js +4 -0
  135. package/lib/plugin/fakerTransform.js +1 -1
  136. package/lib/plugin/stepByStepReport.js +8 -6
  137. package/lib/workers.js +12 -0
  138. package/package.json +3 -3
  139. package/typings/types.d.ts +534 -112
@@ -279,6 +279,8 @@ I.amOnPage('/login'); // opens a login page
279
279
 
280
280
  - `url` **[string][8]** url path or global url.
281
281
 
282
+ Returns **void** automatically synchronized promise with recorder #!
283
+
282
284
  ### appendField
283
285
 
284
286
  Appends text to a input field or textarea.
@@ -292,6 +294,7 @@ I.appendField('#myTextField', 'appended');
292
294
 
293
295
  - `field` **([string][8] | [object][6])** located by label|name|CSS|XPath|strict locator
294
296
  - `value` **[string][8]** text value to append.
297
+ [!] returns a _promise_ which is synchronized internally by recorder
295
298
 
296
299
 
297
300
  This action supports [React locators](https://codecept.io/react#locators)
@@ -311,7 +314,8 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
311
314
  #### Parameters
312
315
 
313
316
  - `locator` **([string][8] | [object][6])** field located by label|name|CSS|XPath|strict locator.
314
- - `pathToFile` **[string][8]** local file path relative to codecept.json config file.> ⚠ There is an [issue with file upload in Puppeteer 2.1.0 & 2.1.1][9], downgrade to 2.0.0 if you face it.
317
+ - `pathToFile` **[string][8]** local file path relative to codecept.json config file.
318
+ [!] returns a _promise_ which is synchronized internally by recorder> ⚠ There is an [issue with file upload in Puppeteer 2.1.0 & 2.1.1][9], downgrade to 2.0.0 if you face it.
315
319
 
316
320
  ### cancelPopup
317
321
 
@@ -333,7 +337,8 @@ I.checkOption('agree', '//form');
333
337
  #### Parameters
334
338
 
335
339
  - `field` **([string][8] | [object][6])** checkbox located by label | name | CSS | XPath | strict locator.
336
- - `context` **([string][8]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
340
+ - `context` **([string][8]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
341
+ [!] returns a _promise_ which is synchronized internally by recorder
337
342
 
338
343
  ### clearCookie
339
344
 
@@ -348,7 +353,8 @@ I.clearCookie('test');
348
353
  #### Parameters
349
354
 
350
355
  - `name`
351
- - `cookie` **[string][8]?** (optional, `null` by default) cookie name
356
+ - `cookie` **[string][8]?** (optional, `null` by default) cookie name
357
+ [!] returns a _promise_ which is synchronized internally by recorder
352
358
 
353
359
  ### clearField
354
360
 
@@ -364,6 +370,7 @@ I.clearField('#email');
364
370
 
365
371
  - `field`
366
372
  - `editable` **([string][8] | [object][6])** field located by label|name|CSS|XPath|strict locator.
373
+ [!] returns a _promise_ which is synchronized internally by recorder
367
374
 
368
375
  ### click
369
376
 
@@ -392,7 +399,8 @@ I.click({css: 'nav a.login'});
392
399
  #### Parameters
393
400
 
394
401
  - `locator` **([string][8] | [object][6])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
395
- - `context` **([string][8]? | [object][6])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
402
+ - `context` **([string][8]? | [object][6] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
403
+ [!] returns a _promise_ which is synchronized internally by recorder
396
404
 
397
405
 
398
406
  This action supports [React locators](https://codecept.io/react#locators)
@@ -410,6 +418,7 @@ I.clickLink('Logout', '#nav');
410
418
 
411
419
  - `locator` **([string][8] | [object][6])** clickable link or button located by text, or any element located by CSS|XPath|strict locator
412
420
  - `context` **([string][8]? | [object][6])** (optional, `null` by default) element to search in CSS|XPath|Strict locator
421
+ [!] returns a _promise_ which is synchronized internally by recorder
413
422
 
414
423
 
415
424
  This action supports [React locators](https://codecept.io/react#locators)
@@ -445,6 +454,7 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
445
454
 
446
455
  - `text` **[string][8]** which is not present.
447
456
  - `context` **([string][8] | [object][6])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
457
+ [!] returns a _promise_ which is synchronized internally by recorder
448
458
 
449
459
 
450
460
  This action supports [React locators](https://codecept.io/react#locators)
@@ -463,6 +473,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
463
473
  #### Parameters
464
474
 
465
475
  - `field` **([string][8] | [object][6])** located by label|name|CSS|XPath|strict locator.
476
+ [!] returns a _promise_ which is synchronized internally by recorder
466
477
 
467
478
  ### dontSeeCookie
468
479
 
@@ -475,6 +486,7 @@ I.dontSeeCookie('auth'); // no auth cookie
475
486
  #### Parameters
476
487
 
477
488
  - `name` **[string][8]** cookie name.
489
+ [!] returns a _promise_ which is synchronized internally by recorder
478
490
 
479
491
  ### dontSeeCurrentUrlEquals
480
492
 
@@ -489,6 +501,7 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
489
501
  #### Parameters
490
502
 
491
503
  - `url` **[string][8]** value to check.
504
+ [!] returns a _promise_ which is synchronized internally by recorder
492
505
 
493
506
  ### dontSeeElement
494
507
 
@@ -501,6 +514,7 @@ I.dontSeeElement('.modal'); // modal is not shown
501
514
  #### Parameters
502
515
 
503
516
  - `locator` **([string][8] | [object][6])** located by CSS|XPath|Strict locator.
517
+ [!] returns a _promise_ which is synchronized internally by recorder
504
518
 
505
519
 
506
520
 
@@ -518,6 +532,7 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
518
532
  #### Parameters
519
533
 
520
534
  - `locator` **([string][8] | [object][6])** located by CSS|XPath|Strict locator.
535
+ [!] returns a _promise_ which is synchronized internally by recorder
521
536
 
522
537
  ### dontSeeInCurrentUrl
523
538
 
@@ -526,6 +541,7 @@ Checks that current url does not contain a provided fragment.
526
541
  #### Parameters
527
542
 
528
543
  - `url` **[string][8]** value to check.
544
+ [!] returns a _promise_ which is synchronized internally by recorder
529
545
 
530
546
  ### dontSeeInField
531
547
 
@@ -541,6 +557,7 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
541
557
 
542
558
  - `field` **([string][8] | [object][6])** located by label|name|CSS|XPath|strict locator.
543
559
  - `value` **[string][8]** value to check.
560
+ [!] returns a _promise_ which is synchronized internally by recorder
544
561
 
545
562
  ### dontSeeInSource
546
563
 
@@ -554,6 +571,7 @@ I.dontSeeInSource('<!--'); // no comments in source
554
571
 
555
572
  - `text`
556
573
  - `value` **[string][8]** to check.
574
+ [!] returns a _promise_ which is synchronized internally by recorder
557
575
 
558
576
  ### dontSeeInTitle
559
577
 
@@ -566,6 +584,7 @@ I.dontSeeInTitle('Error');
566
584
  #### Parameters
567
585
 
568
586
  - `text` **[string][8]** value to check.
587
+ [!] returns a _promise_ which is synchronized internally by recorder
569
588
 
570
589
  ### doubleClick
571
590
 
@@ -583,6 +602,7 @@ I.doubleClick('.btn.edit');
583
602
 
584
603
  - `locator` **([string][8] | [object][6])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
585
604
  - `context` **([string][8]? | [object][6])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
605
+ [!] returns a _promise_ which is synchronized internally by recorder
586
606
 
587
607
 
588
608
  This action supports [React locators](https://codecept.io/react#locators)
@@ -611,6 +631,7 @@ I.dragAndDrop('#dragHandle', '#container');
611
631
 
612
632
  - `srcElement` **([string][8] | [object][6])** located by CSS|XPath|strict locator.
613
633
  - `destElement` **([string][8] | [object][6])** located by CSS|XPath|strict locator.
634
+ [!] returns a _promise_ which is synchronized internally by recorder
614
635
 
615
636
  ### dragSlider
616
637
 
@@ -626,6 +647,7 @@ I.dragSlider('#slider', -70);
626
647
 
627
648
  - `locator` **([string][8] | [object][6])** located by label|name|CSS|XPath|strict locator.
628
649
  - `offsetX` **[number][10]** position to drag.
650
+ [!] returns a _promise_ which is synchronized internally by recorder
629
651
 
630
652
 
631
653
 
@@ -658,10 +680,9 @@ let val = await I.executeAsyncScript(function(url, done) {
658
680
  #### Parameters
659
681
 
660
682
  - `args` **...any** to be passed to function.
683
+ [!] returns a _promise_ which is synchronized internally by recorderAsynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
661
684
  - `fn` **([string][8] | [function][12])** function to be executed in browser context.
662
685
 
663
- Returns **[Promise][13]&lt;any>** Asynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
664
-
665
686
  ### executeScript
666
687
 
667
688
  Executes sync script on a page.
@@ -691,10 +712,9 @@ let date = await I.executeScript(function(el) {
691
712
  #### Parameters
692
713
 
693
714
  - `args` **...any** to be passed to function.
715
+ [!] returns a _promise_ which is synchronized internally by recorderIf a function returns a Promise It will wait for it resolution.
694
716
  - `fn` **([string][8] | [function][12])** function to be executed in browser context.
695
717
 
696
- Returns **[Promise][13]&lt;any>** If a function returns a Promise It will wait for it resolution.
697
-
698
718
  ### fillField
699
719
 
700
720
  Fills a text field or textarea, after clearing its value, with the given string.
@@ -715,6 +735,8 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
715
735
 
716
736
  - `field` **([string][8] | [object][6])** located by label|name|CSS|XPath|strict locator.
717
737
  - `value` **([string][8] | [object][6])** text value to fill.
738
+ [!] returns a _promise_ which is synchronized internally by recorder
739
+
718
740
 
719
741
 
720
742
  This action supports [React locators](https://codecept.io/react#locators)
@@ -751,6 +773,7 @@ I.forceClick({css: 'nav a.login'});
751
773
 
752
774
  - `locator` **([string][8] | [object][6])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
753
775
  - `context` **([string][8]? | [object][6])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
776
+ [!] returns a _promise_ which is synchronized internally by recorder
754
777
 
755
778
 
756
779
  This action supports [React locators](https://codecept.io/react#locators)
@@ -901,6 +924,8 @@ let data = await I.grabDataFromPerformanceTiming();
901
924
  }
902
925
  ```
903
926
 
927
+ Returns **[Promise][13]&lt;any>** automatically synchronized promise through #recorder
928
+
904
929
  ### grabElementBoundingRect
905
930
 
906
931
  Grab the width, height, location of given locator.
@@ -1155,6 +1180,8 @@ I.moveCursorTo('#submit', 5,5);
1155
1180
  - `locator` **([string][8] | [object][6])** located by CSS|XPath|strict locator.
1156
1181
  - `offsetX` **[number][10]** (optional, `0` by default) X-axis offset.
1157
1182
  - `offsetY` **[number][10]** (optional, `0` by default) Y-axis offset.
1183
+ [!] returns a _promise_ which is synchronized internally by recorder
1184
+
1158
1185
 
1159
1186
 
1160
1187
  This action supports [React locators](https://codecept.io/react#locators)
@@ -1231,7 +1258,8 @@ Some of the supported key names are:
1231
1258
 
1232
1259
  #### Parameters
1233
1260
 
1234
- - `key` **([string][8] | [Array][14]&lt;[string][8]>)** key or array of keys to press._Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313][17]).
1261
+ - `key` **([string][8] | [Array][14]&lt;[string][8]>)** key or array of keys to press.
1262
+ [!] returns a _promise_ which is synchronized internally by recorder_Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313][17]).
1235
1263
 
1236
1264
  ### pressKeyDown
1237
1265
 
@@ -1248,6 +1276,7 @@ I.pressKeyUp('Control');
1248
1276
  #### Parameters
1249
1277
 
1250
1278
  - `key` **[string][8]** name of key to press down.
1279
+ [!] returns a _promise_ which is synchronized internally by recorder
1251
1280
 
1252
1281
  ### pressKeyUp
1253
1282
 
@@ -1264,6 +1293,7 @@ I.pressKeyUp('Control');
1264
1293
  #### Parameters
1265
1294
 
1266
1295
  - `key` **[string][8]** name of key to release.
1296
+ [!] returns a _promise_ which is synchronized internally by recorder
1267
1297
 
1268
1298
  ### refreshPage
1269
1299
 
@@ -1273,6 +1303,8 @@ Reload the current page.
1273
1303
  I.refreshPage();
1274
1304
  ```
1275
1305
 
1306
+ [!] returns a _promise_ which is synchronized internally by recorder
1307
+
1276
1308
  ### resizeWindow
1277
1309
 
1278
1310
  Resize the current window to provided width and height.
@@ -1281,7 +1313,8 @@ First parameter can be set to `maximize`.
1281
1313
  #### Parameters
1282
1314
 
1283
1315
  - `width` **[number][10]** width in pixels or `maximize`.
1284
- - `height` **[number][10]** height in pixels.Unlike other drivers Puppeteer changes the size of a viewport, not the window!
1316
+ - `height` **[number][10]** height in pixels.
1317
+ [!] returns a _promise_ which is synchronized internally by recorderUnlike other drivers Puppeteer changes the size of a viewport, not the window!
1285
1318
  Puppeteer does not control the window of a browser so it can't adjust its real size.
1286
1319
  It also can't maximize a window.
1287
1320
 
@@ -1302,6 +1335,7 @@ I.rightClick('Click me', '.context');
1302
1335
 
1303
1336
  - `locator` **([string][8] | [object][6])** clickable element located by CSS|XPath|strict locator.
1304
1337
  - `context` **([string][8]? | [object][6])** (optional, `null` by default) element located by CSS|XPath|strict locator.
1338
+ [!] returns a _promise_ which is synchronized internally by recorder
1305
1339
 
1306
1340
 
1307
1341
  This action supports [React locators](https://codecept.io/react#locators)
@@ -1320,6 +1354,7 @@ I.saveElementScreenshot(`#submit`,'debug.png');
1320
1354
 
1321
1355
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
1322
1356
  - `fileName` **[string][8]** file name to save.
1357
+ [!] returns a _promise_ which is synchronized internally by recorder
1323
1358
 
1324
1359
  ### saveScreenshot
1325
1360
 
@@ -1335,7 +1370,8 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
1335
1370
  #### Parameters
1336
1371
 
1337
1372
  - `fileName` **[string][8]** file name to save.
1338
- - `fullPage` **[boolean][19]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
1373
+ - `fullPage` **[boolean][19]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
1374
+ [!] returns a _promise_ which is synchronized internally by recorder
1339
1375
 
1340
1376
  ### scrollPageToBottom
1341
1377
 
@@ -1345,6 +1381,8 @@ Scroll page to the bottom.
1345
1381
  I.scrollPageToBottom();
1346
1382
  ```
1347
1383
 
1384
+ [!] returns a _promise_ which is synchronized internally by recorder
1385
+
1348
1386
  ### scrollPageToTop
1349
1387
 
1350
1388
  Scroll page to the top.
@@ -1353,6 +1391,8 @@ Scroll page to the top.
1353
1391
  I.scrollPageToTop();
1354
1392
  ```
1355
1393
 
1394
+ [!] returns a _promise_ which is synchronized internally by recorder
1395
+
1356
1396
  ### scrollTo
1357
1397
 
1358
1398
  Scrolls to element matched by locator.
@@ -1367,7 +1407,8 @@ I.scrollTo('#submit', 5, 5);
1367
1407
 
1368
1408
  - `locator` **([string][8] | [object][6])** located by CSS|XPath|strict locator.
1369
1409
  - `offsetX` **[number][10]** (optional, `0` by default) X-axis offset.
1370
- - `offsetY` **[number][10]** (optional, `0` by default) Y-axis offset.
1410
+ - `offsetY` **[number][10]** (optional, `0` by default) Y-axis offset.
1411
+ [!] returns a _promise_ which is synchronized internally by recorder
1371
1412
 
1372
1413
  ### see
1373
1414
 
@@ -1384,6 +1425,7 @@ I.see('Register', {css: 'form.register'}); // use strict locator
1384
1425
 
1385
1426
  - `text` **[string][8]** expected on page.
1386
1427
  - `context` **([string][8]? | [object][6])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1428
+ [!] returns a _promise_ which is synchronized internally by recorder
1387
1429
 
1388
1430
 
1389
1431
  This action supports [React locators](https://codecept.io/react#locators)
@@ -1401,6 +1443,7 @@ I.seeAttributesOnElements('//form', { method: "post"});
1401
1443
 
1402
1444
  - `locator` **([string][8] | [object][6])** located by CSS|XPath|strict locator.
1403
1445
  - `attributes` **[object][6]** attributes and their values to check.
1446
+ [!] returns a _promise_ which is synchronized internally by recorder
1404
1447
 
1405
1448
 
1406
1449
 
@@ -1420,6 +1463,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
1420
1463
  #### Parameters
1421
1464
 
1422
1465
  - `field` **([string][8] | [object][6])** located by label|name|CSS|XPath|strict locator.
1466
+ [!] returns a _promise_ which is synchronized internally by recorder
1423
1467
 
1424
1468
  ### seeCookie
1425
1469
 
@@ -1432,6 +1476,7 @@ I.seeCookie('Auth');
1432
1476
  #### Parameters
1433
1477
 
1434
1478
  - `name` **[string][8]** cookie name.
1479
+ [!] returns a _promise_ which is synchronized internally by recorder
1435
1480
 
1436
1481
  ### seeCssPropertiesOnElements
1437
1482
 
@@ -1445,6 +1490,7 @@ I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
1445
1490
 
1446
1491
  - `locator` **([string][8] | [object][6])** located by CSS|XPath|strict locator.
1447
1492
  - `cssProperties` **[object][6]** object with CSS properties and their values to check.
1493
+ [!] returns a _promise_ which is synchronized internally by recorder
1448
1494
 
1449
1495
 
1450
1496
 
@@ -1465,6 +1511,7 @@ I.seeCurrentUrlEquals('http://my.site.com/register');
1465
1511
  #### Parameters
1466
1512
 
1467
1513
  - `url` **[string][8]** value to check.
1514
+ [!] returns a _promise_ which is synchronized internally by recorder
1468
1515
 
1469
1516
  ### seeElement
1470
1517
 
@@ -1478,6 +1525,7 @@ I.seeElement('#modal');
1478
1525
  #### Parameters
1479
1526
 
1480
1527
  - `locator` **([string][8] | [object][6])** located by CSS|XPath|strict locator.
1528
+ [!] returns a _promise_ which is synchronized internally by recorder
1481
1529
 
1482
1530
 
1483
1531
 
@@ -1496,6 +1544,7 @@ I.seeElementInDOM('#modal');
1496
1544
  #### Parameters
1497
1545
 
1498
1546
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
1547
+ [!] returns a _promise_ which is synchronized internally by recorder
1499
1548
 
1500
1549
  ### seeInCurrentUrl
1501
1550
 
@@ -1508,6 +1557,7 @@ I.seeInCurrentUrl('/register'); // we are on registration page
1508
1557
  #### Parameters
1509
1558
 
1510
1559
  - `url` **[string][8]** a fragment to check
1560
+ [!] returns a _promise_ which is synchronized internally by recorder
1511
1561
 
1512
1562
  ### seeInField
1513
1563
 
@@ -1525,6 +1575,7 @@ I.seeInField('#searchform input','Search');
1525
1575
 
1526
1576
  - `field` **([string][8] | [object][6])** located by label|name|CSS|XPath|strict locator.
1527
1577
  - `value` **[string][8]** value to check.
1578
+ [!] returns a _promise_ which is synchronized internally by recorder
1528
1579
 
1529
1580
  ### seeInPopup
1530
1581
 
@@ -1538,6 +1589,7 @@ I.seeInPopup('Popup text');
1538
1589
  #### Parameters
1539
1590
 
1540
1591
  - `text` **[string][8]** value to check.
1592
+ [!] returns a _promise_ which is synchronized internally by recorder
1541
1593
 
1542
1594
  ### seeInSource
1543
1595
 
@@ -1550,6 +1602,7 @@ I.seeInSource('<h1>Green eggs &amp; ham</h1>');
1550
1602
  #### Parameters
1551
1603
 
1552
1604
  - `text` **[string][8]** value to check.
1605
+ [!] returns a _promise_ which is synchronized internally by recorder
1553
1606
 
1554
1607
  ### seeInTitle
1555
1608
 
@@ -1562,6 +1615,7 @@ I.seeInTitle('Home Page');
1562
1615
  #### Parameters
1563
1616
 
1564
1617
  - `text` **[string][8]** text value to check.
1618
+ [!] returns a _promise_ which is synchronized internally by recorder
1565
1619
 
1566
1620
  ### seeNumberOfElements
1567
1621
 
@@ -1576,6 +1630,7 @@ I.seeNumberOfElements('#submitBtn', 1);
1576
1630
 
1577
1631
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
1578
1632
  - `num` **[number][10]** number of elements.
1633
+ [!] returns a _promise_ which is synchronized internally by recorder
1579
1634
 
1580
1635
 
1581
1636
  This action supports [React locators](https://codecept.io/react#locators)
@@ -1594,6 +1649,7 @@ I.seeNumberOfVisibleElements('.buttons', 3);
1594
1649
 
1595
1650
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
1596
1651
  - `num` **[number][10]** number of elements.
1652
+ [!] returns a _promise_ which is synchronized internally by recorder
1597
1653
 
1598
1654
 
1599
1655
  This action supports [React locators](https://codecept.io/react#locators)
@@ -1610,7 +1666,8 @@ I.seeTextEquals('text', 'h1');
1610
1666
  #### Parameters
1611
1667
 
1612
1668
  - `text` **[string][8]** element value to check.
1613
- - `context` **([string][8] | [object][6])?** element located by CSS|XPath|strict locator.
1669
+ - `context` **([string][8] | [object][6])?** element located by CSS|XPath|strict locator.
1670
+ [!] returns a _promise_ which is synchronized internally by recorder
1614
1671
 
1615
1672
  ### seeTitleEquals
1616
1673
 
@@ -1623,6 +1680,7 @@ I.seeTitleEquals('Test title.');
1623
1680
  #### Parameters
1624
1681
 
1625
1682
  - `text` **[string][8]** value to check.
1683
+ [!] returns a _promise_ which is synchronized internally by recorder
1626
1684
 
1627
1685
  ### selectOption
1628
1686
 
@@ -1649,6 +1707,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
1649
1707
 
1650
1708
  - `select` **([string][8] | [object][6])** field located by label|name|CSS|XPath|strict locator.
1651
1709
  - `option` **([string][8] | [Array][14]&lt;any>)** visible text or value of option.
1710
+ [!] returns a _promise_ which is synchronized internally by recorder
1652
1711
 
1653
1712
  ### setCookie
1654
1713
 
@@ -1669,6 +1728,7 @@ I.setCookie([
1669
1728
  #### Parameters
1670
1729
 
1671
1730
  - `cookie` **(Cookie | [Array][14]&lt;Cookie>)** a cookie object or array of cookie objects.
1731
+ [!] returns a _promise_ which is synchronized internally by recorder
1672
1732
 
1673
1733
  ### switchTo
1674
1734
 
@@ -1681,7 +1741,8 @@ I.switchTo(); // switch back to main page
1681
1741
 
1682
1742
  #### Parameters
1683
1743
 
1684
- - `locator` **([string][8]? | [object][6])** (optional, `null` by default) element located by CSS|XPath|strict locator.
1744
+ - `locator` **([string][8]? | [object][6])** (optional, `null` by default) element located by CSS|XPath|strict locator.
1745
+ [!] returns a _promise_ which is synchronized internally by recorder
1685
1746
 
1686
1747
  ### switchToNextTab
1687
1748
 
@@ -1729,7 +1790,8 @@ I.type(['T', 'E', 'X', 'T']);
1729
1790
  #### Parameters
1730
1791
 
1731
1792
  - `keys`
1732
- - `delay` **[number][10]?** (optional) delay in ms between key presses
1793
+ - `delay` **[number][10]?** (optional) delay in ms between key presses
1794
+ [!] returns a _promise_ which is synchronized internally by recorder
1733
1795
  - `key` **([string][8] | [Array][14]&lt;[string][8]>)** or array of keys to type.
1734
1796
 
1735
1797
  ### uncheckOption
@@ -1748,7 +1810,8 @@ I.uncheckOption('agree', '//form');
1748
1810
  #### Parameters
1749
1811
 
1750
1812
  - `field` **([string][8] | [object][6])** checkbox located by label | name | CSS | XPath | strict locator.
1751
- - `context` **([string][8]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
1813
+ - `context` **([string][8]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
1814
+ [!] returns a _promise_ which is synchronized internally by recorder
1752
1815
 
1753
1816
  ### usePuppeteerTo
1754
1817
 
@@ -1781,6 +1844,7 @@ I.wait(2); // wait 2 secs
1781
1844
  #### Parameters
1782
1845
 
1783
1846
  - `sec` **[number][10]** number of second to wait.
1847
+ [!] returns a _promise_ which is synchronized internally by recorder
1784
1848
 
1785
1849
  ### waitForClickable
1786
1850
 
@@ -1797,6 +1861,7 @@ I.waitForClickable('.btn.continue', 5); // wait for 5 secs
1797
1861
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
1798
1862
  - `waitTimeout`
1799
1863
  - `sec` **[number][10]?** (optional, `1` by default) time in seconds to wait
1864
+ [!] returns a _promise_ which is synchronized internally by recorder
1800
1865
 
1801
1866
  ### waitForDetached
1802
1867
 
@@ -1810,7 +1875,8 @@ I.waitForDetached('#popup');
1810
1875
  #### Parameters
1811
1876
 
1812
1877
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
1813
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1878
+ - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1879
+ [!] returns a _promise_ which is synchronized internally by recorder
1814
1880
 
1815
1881
  ### waitForElement
1816
1882
 
@@ -1826,6 +1892,7 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
1826
1892
 
1827
1893
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
1828
1894
  - `sec` **[number][10]?** (optional, `1` by default) time in seconds to wait
1895
+ [!] returns a _promise_ which is synchronized internally by recorder
1829
1896
 
1830
1897
 
1831
1898
 
@@ -1840,7 +1907,8 @@ Element can be located by CSS or XPath.
1840
1907
  #### Parameters
1841
1908
 
1842
1909
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
1843
- - `sec` **[number][10]** (optional) time in seconds to wait, 1 by default.
1910
+ - `sec` **[number][10]** (optional) time in seconds to wait, 1 by default.
1911
+ [!] returns a _promise_ which is synchronized internally by recorder
1844
1912
 
1845
1913
  ### waitForFunction
1846
1914
 
@@ -1861,7 +1929,8 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
1861
1929
 
1862
1930
  - `fn` **([string][8] | [function][12])** to be executed in browser context.
1863
1931
  - `argsOrSec` **([Array][14]&lt;any> | [number][10])?** (optional, `1` by default) arguments for function or seconds.
1864
- - `sec` **[number][10]?** (optional, `1` by default) time in seconds to wait
1932
+ - `sec` **[number][10]?** (optional, `1` by default) time in seconds to wait
1933
+ [!] returns a _promise_ which is synchronized internally by recorder
1865
1934
 
1866
1935
  ### waitForInvisible
1867
1936
 
@@ -1875,7 +1944,8 @@ I.waitForInvisible('#popup');
1875
1944
  #### Parameters
1876
1945
 
1877
1946
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
1878
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1947
+ - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1948
+ [!] returns a _promise_ which is synchronized internally by recorder
1879
1949
 
1880
1950
  ### waitForNavigation
1881
1951
 
@@ -1930,7 +2000,8 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
1930
2000
 
1931
2001
  - `text` **[string][8]** to wait for.
1932
2002
  - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1933
- - `context` **([string][8] | [object][6])?** (optional) element located by CSS|XPath|strict locator.
2003
+ - `context` **([string][8] | [object][6])?** (optional) element located by CSS|XPath|strict locator.
2004
+ [!] returns a _promise_ which is synchronized internally by recorder
1934
2005
 
1935
2006
  ### waitForValue
1936
2007
 
@@ -1944,7 +2015,8 @@ I.waitForValue('//input', "GoodValue");
1944
2015
 
1945
2016
  - `field` **([string][8] | [object][6])** input field.
1946
2017
  - `value` **[string][8]** expected value.
1947
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
2018
+ - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
2019
+ [!] returns a _promise_ which is synchronized internally by recorder
1948
2020
 
1949
2021
  ### waitForVisible
1950
2022
 
@@ -1958,7 +2030,8 @@ I.waitForVisible('#popup');
1958
2030
  #### Parameters
1959
2031
 
1960
2032
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
1961
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to waitThis method accepts [React selectors][22].
2033
+ - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
2034
+ [!] returns a _promise_ which is synchronized internally by recorderThis method accepts [React selectors][22].
1962
2035
 
1963
2036
  ### waitInUrl
1964
2037
 
@@ -1971,7 +2044,8 @@ I.waitInUrl('/info', 2);
1971
2044
  #### Parameters
1972
2045
 
1973
2046
  - `urlPart` **[string][8]** value to check.
1974
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
2047
+ - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
2048
+ [!] returns a _promise_ which is synchronized internally by recorder
1975
2049
 
1976
2050
  ### waitNumberOfVisibleElements
1977
2051
 
@@ -1986,6 +2060,7 @@ I.waitNumberOfVisibleElements('a', 3);
1986
2060
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
1987
2061
  - `num` **[number][10]** number of elements.
1988
2062
  - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
2063
+ [!] returns a _promise_ which is synchronized internally by recorder
1989
2064
 
1990
2065
 
1991
2066
 
@@ -2004,7 +2079,8 @@ I.waitToHide('#popup');
2004
2079
  #### Parameters
2005
2080
 
2006
2081
  - `locator` **([string][8] | [object][6])** element located by CSS|XPath|strict locator.
2007
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
2082
+ - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
2083
+ [!] returns a _promise_ which is synchronized internally by recorder
2008
2084
 
2009
2085
  ### waitUrlEquals
2010
2086
 
@@ -2018,7 +2094,8 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
2018
2094
  #### Parameters
2019
2095
 
2020
2096
  - `urlPart` **[string][8]** value to check.
2021
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
2097
+ - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
2098
+ [!] returns a _promise_ which is synchronized internally by recorder
2022
2099
 
2023
2100
  [1]: https://github.com/GoogleChrome/puppeteer
2024
2101
 
@@ -82,7 +82,7 @@ I.amBearerAuthenticated(secret('heregoestoken'))
82
82
 
83
83
  #### Parameters
84
84
 
85
- - `accessToken` **[string][3]** Bearer access token
85
+ - `accessToken` **([string][3] | CodeceptJS.Secret)** Bearer access token
86
86
 
87
87
  ### haveRequestHeaders
88
88