codeceptjs 3.5.5 → 3.5.7-beta.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.
- package/CHANGELOG.md +63 -0
- package/docs/bdd.md +11 -7
- package/docs/build/ApiDataFactory.js +2 -1
- package/docs/build/Appium.js +25 -23
- package/docs/build/Expect.js +422 -0
- package/docs/build/FileSystem.js +1 -1
- package/docs/build/Nightmare.js +53 -56
- package/docs/build/Playwright.js +209 -135
- package/docs/build/Protractor.js +66 -69
- package/docs/build/Puppeteer.js +83 -83
- package/docs/build/TestCafe.js +56 -55
- package/docs/build/WebDriver.js +85 -86
- package/docs/changelog.md +63 -0
- package/docs/commands.md +12 -0
- package/docs/helpers/Appium.md +50 -32
- package/docs/helpers/Expect.md +275 -0
- package/docs/helpers/FileSystem.md +1 -1
- package/docs/helpers/Nightmare.md +141 -94
- package/docs/helpers/Playwright.md +281 -212
- package/docs/helpers/Protractor.md +229 -169
- package/docs/helpers/Puppeteer.md +257 -186
- package/docs/helpers/TestCafe.md +201 -149
- package/docs/helpers/WebDriver.md +253 -179
- package/docs/mobile.md +17 -21
- package/docs/plugins.md +35 -1
- package/docs/webapi/amOnPage.mustache +1 -1
- package/docs/webapi/appendField.mustache +1 -1
- package/docs/webapi/attachFile.mustache +1 -1
- package/docs/webapi/blur.mustache +1 -0
- package/docs/webapi/checkOption.mustache +1 -1
- package/docs/webapi/clearCookie.mustache +1 -1
- package/docs/webapi/clearField.mustache +1 -1
- package/docs/webapi/click.mustache +1 -1
- package/docs/webapi/clickLink.mustache +1 -1
- package/docs/webapi/closeCurrentTab.mustache +1 -1
- package/docs/webapi/closeOtherTabs.mustache +1 -1
- package/docs/webapi/dontSee.mustache +1 -1
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/dontSeeCookie.mustache +1 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/dontSeeElement.mustache +1 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
- package/docs/webapi/dontSeeInField.mustache +1 -1
- package/docs/webapi/dontSeeInSource.mustache +1 -1
- package/docs/webapi/dontSeeInTitle.mustache +1 -1
- package/docs/webapi/doubleClick.mustache +1 -1
- package/docs/webapi/downloadFile.mustache +1 -1
- package/docs/webapi/dragAndDrop.mustache +1 -1
- package/docs/webapi/dragSlider.mustache +1 -1
- package/docs/webapi/executeAsyncScript.mustache +0 -2
- package/docs/webapi/executeScript.mustache +0 -2
- package/docs/webapi/fillField.mustache +1 -1
- package/docs/webapi/focus.mustache +1 -0
- package/docs/webapi/forceClick.mustache +1 -1
- package/docs/webapi/forceRightClick.mustache +1 -1
- package/docs/webapi/grabCookie.mustache +1 -1
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +1 -1
- package/docs/webapi/moveCursorTo.mustache +1 -1
- package/docs/webapi/openNewTab.mustache +1 -1
- package/docs/webapi/pressKey.mustache +1 -1
- package/docs/webapi/pressKeyDown.mustache +1 -1
- package/docs/webapi/pressKeyUp.mustache +1 -1
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
- package/docs/webapi/refreshPage.mustache +1 -1
- package/docs/webapi/resizeWindow.mustache +1 -1
- package/docs/webapi/rightClick.mustache +1 -1
- package/docs/webapi/saveElementScreenshot.mustache +1 -1
- package/docs/webapi/saveScreenshot.mustache +1 -1
- package/docs/webapi/say.mustache +1 -1
- package/docs/webapi/scrollIntoView.mustache +1 -1
- package/docs/webapi/scrollPageToBottom.mustache +1 -1
- package/docs/webapi/scrollPageToTop.mustache +1 -1
- package/docs/webapi/scrollTo.mustache +1 -1
- package/docs/webapi/see.mustache +1 -1
- package/docs/webapi/seeAttributesOnElements.mustache +1 -1
- package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/seeCookie.mustache +1 -1
- package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
- package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/seeElement.mustache +1 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -1
- package/docs/webapi/seeInCurrentUrl.mustache +1 -1
- package/docs/webapi/seeInField.mustache +1 -1
- package/docs/webapi/seeInPopup.mustache +1 -1
- package/docs/webapi/seeInSource.mustache +1 -1
- package/docs/webapi/seeInTitle.mustache +1 -1
- package/docs/webapi/seeNumberOfElements.mustache +1 -1
- package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/seeTextEquals.mustache +1 -1
- package/docs/webapi/seeTitleEquals.mustache +1 -1
- package/docs/webapi/selectOption.mustache +1 -1
- package/docs/webapi/setCookie.mustache +1 -1
- package/docs/webapi/setGeoLocation.mustache +1 -1
- package/docs/webapi/switchTo.mustache +1 -1
- package/docs/webapi/switchToNextTab.mustache +1 -1
- package/docs/webapi/switchToPreviousTab.mustache +1 -1
- package/docs/webapi/type.mustache +1 -1
- package/docs/webapi/uncheckOption.mustache +1 -1
- package/docs/webapi/wait.mustache +1 -1
- package/docs/webapi/waitForClickable.mustache +1 -1
- package/docs/webapi/waitForDetached.mustache +1 -1
- package/docs/webapi/waitForElement.mustache +1 -1
- package/docs/webapi/waitForEnabled.mustache +1 -1
- package/docs/webapi/waitForFunction.mustache +1 -1
- package/docs/webapi/waitForInvisible.mustache +1 -1
- package/docs/webapi/waitForText.mustache +1 -1
- package/docs/webapi/waitForValue.mustache +1 -1
- package/docs/webapi/waitForVisible.mustache +1 -1
- package/docs/webapi/waitInUrl.mustache +1 -1
- package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/waitToHide.mustache +1 -1
- package/docs/webapi/waitUrlEquals.mustache +1 -1
- package/lib/ai.js +12 -3
- package/lib/cli.js +3 -1
- package/lib/codecept.js +3 -0
- package/lib/command/dryRun.js +2 -1
- package/lib/command/info.js +24 -0
- package/lib/command/run-workers.js +3 -2
- package/lib/command/run.js +3 -2
- package/lib/data/context.js +14 -6
- package/lib/helper/ApiDataFactory.js +2 -1
- package/lib/helper/Appium.js +7 -5
- package/lib/helper/Expect.js +422 -0
- package/lib/helper/FileSystem.js +1 -1
- package/lib/helper/Playwright.js +134 -64
- package/lib/helper/Puppeteer.js +6 -6
- package/lib/helper/WebDriver.js +4 -4
- package/lib/helper/scripts/highlightElement.js +1 -1
- package/lib/html.js +3 -3
- package/lib/interfaces/gherkin.js +21 -2
- package/lib/output.js +1 -1
- package/lib/pause.js +6 -5
- package/lib/plugin/autoLogin.js +35 -8
- package/lib/plugin/heal.js +40 -7
- package/lib/plugin/retryTo.js +0 -2
- package/lib/plugin/tryTo.js +0 -3
- package/lib/recorder.js +12 -5
- package/lib/session.js +1 -1
- package/package.json +24 -17
- package/translations/de-DE.js +5 -0
- package/translations/fr-FR.js +14 -1
- package/translations/it-IT.js +1 -0
- package/translations/ja-JP.js +5 -0
- package/translations/pl-PL.js +5 -0
- package/translations/pt-BR.js +1 -0
- package/translations/ru-RU.js +1 -0
- package/translations/zh-CN.js +5 -0
- package/translations/zh-TW.js +5 -0
- package/typings/promiseBasedTypes.d.ts +905 -863
- package/typings/types.d.ts +909 -850
package/docs/build/TestCafe.js
CHANGED
|
@@ -334,7 +334,8 @@ class TestCafe extends Helper {
|
|
|
334
334
|
* ```
|
|
335
335
|
*
|
|
336
336
|
* @param {string} url url path or global url.
|
|
337
|
-
* @
|
|
337
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
338
|
+
*
|
|
338
339
|
*/
|
|
339
340
|
async amOnPage(url) {
|
|
340
341
|
if (!(/^\w+\:\/\//.test(url))) {
|
|
@@ -351,7 +352,7 @@ class TestCafe extends Helper {
|
|
|
351
352
|
*
|
|
352
353
|
* @param {number} width width in pixels or `maximize`.
|
|
353
354
|
* @param {number} height height in pixels.
|
|
354
|
-
*
|
|
355
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
355
356
|
*
|
|
356
357
|
*/
|
|
357
358
|
async resizeWindow(width, height) {
|
|
@@ -375,6 +376,7 @@ class TestCafe extends Helper {
|
|
|
375
376
|
*
|
|
376
377
|
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
377
378
|
* @param {any} [options] Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
379
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
378
380
|
*
|
|
379
381
|
*
|
|
380
382
|
*/
|
|
@@ -406,6 +408,7 @@ class TestCafe extends Helper {
|
|
|
406
408
|
*
|
|
407
409
|
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
408
410
|
* @param {any} [options] Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
411
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
409
412
|
*
|
|
410
413
|
*
|
|
411
414
|
*/
|
|
@@ -444,7 +447,7 @@ class TestCafe extends Helper {
|
|
|
444
447
|
*
|
|
445
448
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
446
449
|
* @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
447
|
-
*
|
|
450
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
448
451
|
*
|
|
449
452
|
*
|
|
450
453
|
*/
|
|
@@ -458,7 +461,7 @@ class TestCafe extends Helper {
|
|
|
458
461
|
* ```js
|
|
459
462
|
* I.refreshPage();
|
|
460
463
|
* ```
|
|
461
|
-
*
|
|
464
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
462
465
|
*
|
|
463
466
|
*/
|
|
464
467
|
async refreshPage() {
|
|
@@ -476,7 +479,7 @@ class TestCafe extends Helper {
|
|
|
476
479
|
*
|
|
477
480
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
478
481
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
479
|
-
*
|
|
482
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
480
483
|
*
|
|
481
484
|
*
|
|
482
485
|
*/
|
|
@@ -504,7 +507,7 @@ class TestCafe extends Helper {
|
|
|
504
507
|
* ```
|
|
505
508
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
506
509
|
* @param {CodeceptJS.StringOrSecret} value text value to fill.
|
|
507
|
-
*
|
|
510
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
508
511
|
*
|
|
509
512
|
*/
|
|
510
513
|
async fillField(field, value) {
|
|
@@ -525,7 +528,7 @@ class TestCafe extends Helper {
|
|
|
525
528
|
* I.clearField('#email');
|
|
526
529
|
* ```
|
|
527
530
|
* @param {LocatorOrString} editable field located by label|name|CSS|XPath|strict locator.
|
|
528
|
-
*
|
|
531
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder.
|
|
529
532
|
*
|
|
530
533
|
*/
|
|
531
534
|
async clearField(field) {
|
|
@@ -550,7 +553,7 @@ class TestCafe extends Helper {
|
|
|
550
553
|
* ```
|
|
551
554
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
|
|
552
555
|
* @param {string} value text value to append.
|
|
553
|
-
*
|
|
556
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
554
557
|
*
|
|
555
558
|
*
|
|
556
559
|
*/
|
|
@@ -576,7 +579,7 @@ class TestCafe extends Helper {
|
|
|
576
579
|
*
|
|
577
580
|
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
578
581
|
* @param {string} pathToFile local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
579
|
-
*
|
|
582
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
580
583
|
*
|
|
581
584
|
*
|
|
582
585
|
*/
|
|
@@ -603,7 +606,7 @@ class TestCafe extends Helper {
|
|
|
603
606
|
* ```
|
|
604
607
|
*
|
|
605
608
|
* @param {string|string[]} key key or array of keys to press.
|
|
606
|
-
*
|
|
609
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
607
610
|
*
|
|
608
611
|
*
|
|
609
612
|
* {{ keys }}
|
|
@@ -628,7 +631,7 @@ class TestCafe extends Helper {
|
|
|
628
631
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
629
632
|
* @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
630
633
|
* @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
631
|
-
*
|
|
634
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
632
635
|
*
|
|
633
636
|
*
|
|
634
637
|
*/
|
|
@@ -654,7 +657,7 @@ class TestCafe extends Helper {
|
|
|
654
657
|
*
|
|
655
658
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
656
659
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
657
|
-
*
|
|
660
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
658
661
|
*
|
|
659
662
|
*
|
|
660
663
|
*/
|
|
@@ -686,7 +689,7 @@ class TestCafe extends Helper {
|
|
|
686
689
|
*
|
|
687
690
|
* @param {CodeceptJS.LocatorOrString} locator clickable element located by CSS|XPath|strict locator.
|
|
688
691
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
689
|
-
*
|
|
692
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
690
693
|
*
|
|
691
694
|
*
|
|
692
695
|
*/
|
|
@@ -717,7 +720,7 @@ class TestCafe extends Helper {
|
|
|
717
720
|
* ```
|
|
718
721
|
* @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
719
722
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
720
|
-
*
|
|
723
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
721
724
|
*
|
|
722
725
|
*/
|
|
723
726
|
async checkOption(field, context = null) {
|
|
@@ -741,7 +744,7 @@ class TestCafe extends Helper {
|
|
|
741
744
|
* ```
|
|
742
745
|
* @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
743
746
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
744
|
-
*
|
|
747
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
745
748
|
*
|
|
746
749
|
*/
|
|
747
750
|
async uncheckOption(field, context = null) {
|
|
@@ -764,7 +767,7 @@ class TestCafe extends Helper {
|
|
|
764
767
|
* ```
|
|
765
768
|
*
|
|
766
769
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
767
|
-
*
|
|
770
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
768
771
|
*
|
|
769
772
|
*/
|
|
770
773
|
async seeCheckboxIsChecked(field) {
|
|
@@ -781,7 +784,7 @@ class TestCafe extends Helper {
|
|
|
781
784
|
* ```
|
|
782
785
|
*
|
|
783
786
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
784
|
-
*
|
|
787
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
785
788
|
*
|
|
786
789
|
*/
|
|
787
790
|
async dontSeeCheckboxIsChecked(field) {
|
|
@@ -809,7 +812,7 @@ class TestCafe extends Helper {
|
|
|
809
812
|
* ```
|
|
810
813
|
* @param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
|
|
811
814
|
* @param {string|Array<*>} option visible text or value of option.
|
|
812
|
-
*
|
|
815
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
813
816
|
*
|
|
814
817
|
*/
|
|
815
818
|
async selectOption(select, option) {
|
|
@@ -862,7 +865,7 @@ class TestCafe extends Helper {
|
|
|
862
865
|
* ```
|
|
863
866
|
*
|
|
864
867
|
* @param {string} url a fragment to check
|
|
865
|
-
*
|
|
868
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
866
869
|
*
|
|
867
870
|
*/
|
|
868
871
|
async seeInCurrentUrl(url) {
|
|
@@ -873,7 +876,7 @@ class TestCafe extends Helper {
|
|
|
873
876
|
* Checks that current url does not contain a provided fragment.
|
|
874
877
|
*
|
|
875
878
|
* @param {string} url value to check.
|
|
876
|
-
*
|
|
879
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
877
880
|
*
|
|
878
881
|
*/
|
|
879
882
|
async dontSeeInCurrentUrl(url) {
|
|
@@ -891,7 +894,7 @@ class TestCafe extends Helper {
|
|
|
891
894
|
* ```
|
|
892
895
|
*
|
|
893
896
|
* @param {string} url value to check.
|
|
894
|
-
*
|
|
897
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
895
898
|
*
|
|
896
899
|
*/
|
|
897
900
|
async seeCurrentUrlEquals(url) {
|
|
@@ -908,7 +911,7 @@ class TestCafe extends Helper {
|
|
|
908
911
|
* ```
|
|
909
912
|
*
|
|
910
913
|
* @param {string} url value to check.
|
|
911
|
-
*
|
|
914
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
912
915
|
*
|
|
913
916
|
*/
|
|
914
917
|
async dontSeeCurrentUrlEquals(url) {
|
|
@@ -926,7 +929,7 @@ class TestCafe extends Helper {
|
|
|
926
929
|
* ```
|
|
927
930
|
* @param {string} text expected on page.
|
|
928
931
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
929
|
-
*
|
|
932
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
930
933
|
*
|
|
931
934
|
*
|
|
932
935
|
*/
|
|
@@ -954,7 +957,7 @@ class TestCafe extends Helper {
|
|
|
954
957
|
*
|
|
955
958
|
* @param {string} text which is not present.
|
|
956
959
|
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
957
|
-
*
|
|
960
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
958
961
|
*
|
|
959
962
|
*
|
|
960
963
|
*/
|
|
@@ -979,7 +982,7 @@ class TestCafe extends Helper {
|
|
|
979
982
|
* I.seeElement('#modal');
|
|
980
983
|
* ```
|
|
981
984
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
982
|
-
*
|
|
985
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
983
986
|
*
|
|
984
987
|
*/
|
|
985
988
|
async seeElement(locator) {
|
|
@@ -997,7 +1000,7 @@ class TestCafe extends Helper {
|
|
|
997
1000
|
* ```
|
|
998
1001
|
*
|
|
999
1002
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
1000
|
-
*
|
|
1003
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1001
1004
|
*
|
|
1002
1005
|
*/
|
|
1003
1006
|
async dontSeeElement(locator) {
|
|
@@ -1015,7 +1018,7 @@ class TestCafe extends Helper {
|
|
|
1015
1018
|
* I.seeElementInDOM('#modal');
|
|
1016
1019
|
* ```
|
|
1017
1020
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1018
|
-
*
|
|
1021
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1019
1022
|
*
|
|
1020
1023
|
*/
|
|
1021
1024
|
async seeElementInDOM(locator) {
|
|
@@ -1033,7 +1036,7 @@ class TestCafe extends Helper {
|
|
|
1033
1036
|
* ```
|
|
1034
1037
|
*
|
|
1035
1038
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
1036
|
-
*
|
|
1039
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1037
1040
|
*
|
|
1038
1041
|
*/
|
|
1039
1042
|
async dontSeeElementInDOM(locator) {
|
|
@@ -1053,7 +1056,7 @@ class TestCafe extends Helper {
|
|
|
1053
1056
|
*
|
|
1054
1057
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1055
1058
|
* @param {number} num number of elements.
|
|
1056
|
-
*
|
|
1059
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1057
1060
|
*
|
|
1058
1061
|
*
|
|
1059
1062
|
*/
|
|
@@ -1092,7 +1095,7 @@ class TestCafe extends Helper {
|
|
|
1092
1095
|
* ```
|
|
1093
1096
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1094
1097
|
* @param {CodeceptJS.StringOrSecret} value value to check.
|
|
1095
|
-
*
|
|
1098
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1096
1099
|
*
|
|
1097
1100
|
*/
|
|
1098
1101
|
async seeInField(field, value) {
|
|
@@ -1118,7 +1121,7 @@ class TestCafe extends Helper {
|
|
|
1118
1121
|
*
|
|
1119
1122
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1120
1123
|
* @param {CodeceptJS.StringOrSecret} value value to check.
|
|
1121
|
-
*
|
|
1124
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1122
1125
|
*
|
|
1123
1126
|
*/
|
|
1124
1127
|
async dontSeeInField(field, value) {
|
|
@@ -1154,7 +1157,7 @@ class TestCafe extends Helper {
|
|
|
1154
1157
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
1155
1158
|
* ```
|
|
1156
1159
|
* @param {string} text value to check.
|
|
1157
|
-
*
|
|
1160
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1158
1161
|
*
|
|
1159
1162
|
*/
|
|
1160
1163
|
async seeInSource(text) {
|
|
@@ -1170,7 +1173,7 @@ class TestCafe extends Helper {
|
|
|
1170
1173
|
* ```
|
|
1171
1174
|
*
|
|
1172
1175
|
* @param {string} value to check.
|
|
1173
|
-
*
|
|
1176
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1174
1177
|
*
|
|
1175
1178
|
*/
|
|
1176
1179
|
async dontSeeInSource(text) {
|
|
@@ -1188,7 +1191,7 @@ class TestCafe extends Helper {
|
|
|
1188
1191
|
*
|
|
1189
1192
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1190
1193
|
* @param {string} fileName file name to save.
|
|
1191
|
-
*
|
|
1194
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1192
1195
|
*
|
|
1193
1196
|
*
|
|
1194
1197
|
*/
|
|
@@ -1215,7 +1218,7 @@ class TestCafe extends Helper {
|
|
|
1215
1218
|
*
|
|
1216
1219
|
* @param {string} fileName file name to save.
|
|
1217
1220
|
* @param {boolean} [fullPage=false] (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
1218
|
-
*
|
|
1221
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1219
1222
|
*
|
|
1220
1223
|
*/
|
|
1221
1224
|
// TODO Implement full page screenshots
|
|
@@ -1235,7 +1238,7 @@ class TestCafe extends Helper {
|
|
|
1235
1238
|
* ```
|
|
1236
1239
|
*
|
|
1237
1240
|
* @param {number} sec number of second to wait.
|
|
1238
|
-
*
|
|
1241
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1239
1242
|
*
|
|
1240
1243
|
*/
|
|
1241
1244
|
async wait(sec) {
|
|
@@ -1272,8 +1275,6 @@ class TestCafe extends Helper {
|
|
|
1272
1275
|
* @param {...any} args to be passed to function.
|
|
1273
1276
|
* @returns {Promise<any>} script return value
|
|
1274
1277
|
*
|
|
1275
|
-
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1276
|
-
*
|
|
1277
1278
|
*
|
|
1278
1279
|
* If a function returns a Promise It will wait for its resolution.
|
|
1279
1280
|
*/
|
|
@@ -1485,7 +1486,7 @@ class TestCafe extends Helper {
|
|
|
1485
1486
|
* ```js
|
|
1486
1487
|
* I.scrollPageToTop();
|
|
1487
1488
|
* ```
|
|
1488
|
-
*
|
|
1489
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1489
1490
|
*
|
|
1490
1491
|
*/
|
|
1491
1492
|
scrollPageToTop() {
|
|
@@ -1498,7 +1499,7 @@ class TestCafe extends Helper {
|
|
|
1498
1499
|
* ```js
|
|
1499
1500
|
* I.scrollPageToBottom();
|
|
1500
1501
|
* ```
|
|
1501
|
-
*
|
|
1502
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1502
1503
|
*
|
|
1503
1504
|
*/
|
|
1504
1505
|
scrollPageToBottom() {
|
|
@@ -1527,7 +1528,7 @@ class TestCafe extends Helper {
|
|
|
1527
1528
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1528
1529
|
* @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
1529
1530
|
* @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
1530
|
-
*
|
|
1531
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1531
1532
|
*
|
|
1532
1533
|
*/
|
|
1533
1534
|
async scrollTo(locator, offsetX = 0, offsetY = 0) {
|
|
@@ -1567,7 +1568,7 @@ class TestCafe extends Helper {
|
|
|
1567
1568
|
* ```
|
|
1568
1569
|
*
|
|
1569
1570
|
* @param {?CodeceptJS.LocatorOrString} [locator=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1570
|
-
*
|
|
1571
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1571
1572
|
*
|
|
1572
1573
|
*/
|
|
1573
1574
|
async switchTo(locator) {
|
|
@@ -1601,7 +1602,7 @@ class TestCafe extends Helper {
|
|
|
1601
1602
|
* ```
|
|
1602
1603
|
*
|
|
1603
1604
|
* @param {Cookie|Array<Cookie>} cookie a cookie object or array of cookie objects.
|
|
1604
|
-
*
|
|
1605
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1605
1606
|
*
|
|
1606
1607
|
*/
|
|
1607
1608
|
async setCookie(cookie) {
|
|
@@ -1627,7 +1628,7 @@ class TestCafe extends Helper {
|
|
|
1627
1628
|
* ```
|
|
1628
1629
|
*
|
|
1629
1630
|
* @param {string} name cookie name.
|
|
1630
|
-
*
|
|
1631
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1631
1632
|
*
|
|
1632
1633
|
*
|
|
1633
1634
|
*/
|
|
@@ -1644,7 +1645,7 @@ class TestCafe extends Helper {
|
|
|
1644
1645
|
* ```
|
|
1645
1646
|
*
|
|
1646
1647
|
* @param {string} name cookie name.
|
|
1647
|
-
*
|
|
1648
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1648
1649
|
*
|
|
1649
1650
|
*/
|
|
1650
1651
|
async dontSeeCookie(name) {
|
|
@@ -1663,7 +1664,7 @@ class TestCafe extends Helper {
|
|
|
1663
1664
|
* ```
|
|
1664
1665
|
*
|
|
1665
1666
|
* @param {?string} [name=null] cookie name.
|
|
1666
|
-
* @returns {
|
|
1667
|
+
* @returns {any} attribute value
|
|
1667
1668
|
*
|
|
1668
1669
|
*
|
|
1669
1670
|
* Returns cookie in JSON format. If name not passed returns all cookies for this domain.
|
|
@@ -1695,7 +1696,7 @@ class TestCafe extends Helper {
|
|
|
1695
1696
|
* ```
|
|
1696
1697
|
*
|
|
1697
1698
|
* @param {?string} [cookie=null] (optional, `null` by default) cookie name
|
|
1698
|
-
*
|
|
1699
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1699
1700
|
*
|
|
1700
1701
|
*/
|
|
1701
1702
|
async clearCookie(cookieName) {
|
|
@@ -1724,7 +1725,7 @@ class TestCafe extends Helper {
|
|
|
1724
1725
|
*
|
|
1725
1726
|
* @param {string} urlPart value to check.
|
|
1726
1727
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1727
|
-
*
|
|
1728
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1728
1729
|
*
|
|
1729
1730
|
*/
|
|
1730
1731
|
async waitInUrl(urlPart, sec = null) {
|
|
@@ -1751,7 +1752,7 @@ class TestCafe extends Helper {
|
|
|
1751
1752
|
*
|
|
1752
1753
|
* @param {string} urlPart value to check.
|
|
1753
1754
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1754
|
-
*
|
|
1755
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1755
1756
|
*
|
|
1756
1757
|
*/
|
|
1757
1758
|
async waitUrlEquals(urlPart, sec = null) {
|
|
@@ -1790,7 +1791,7 @@ class TestCafe extends Helper {
|
|
|
1790
1791
|
* @param {string|function} fn to be executed in browser context.
|
|
1791
1792
|
* @param {any[]|number} [argsOrSec] (optional, `1` by default) arguments for function or seconds.
|
|
1792
1793
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
1793
|
-
*
|
|
1794
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1794
1795
|
*
|
|
1795
1796
|
*/
|
|
1796
1797
|
async waitForFunction(fn, argsOrSec = null, sec = null) {
|
|
@@ -1819,7 +1820,7 @@ class TestCafe extends Helper {
|
|
|
1819
1820
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1820
1821
|
* @param {number} num number of elements.
|
|
1821
1822
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1822
|
-
*
|
|
1823
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1823
1824
|
*
|
|
1824
1825
|
*/
|
|
1825
1826
|
async waitNumberOfVisibleElements(locator, num, sec) {
|
|
@@ -1842,7 +1843,7 @@ class TestCafe extends Helper {
|
|
|
1842
1843
|
*
|
|
1843
1844
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1844
1845
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
1845
|
-
*
|
|
1846
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1846
1847
|
*
|
|
1847
1848
|
*/
|
|
1848
1849
|
async waitForElement(locator, sec) {
|
|
@@ -1863,7 +1864,7 @@ class TestCafe extends Helper {
|
|
|
1863
1864
|
*
|
|
1864
1865
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1865
1866
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1866
|
-
*
|
|
1867
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1867
1868
|
*
|
|
1868
1869
|
*/
|
|
1869
1870
|
async waitToHide(locator, sec) {
|
|
@@ -1884,7 +1885,7 @@ class TestCafe extends Helper {
|
|
|
1884
1885
|
*
|
|
1885
1886
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1886
1887
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1887
|
-
*
|
|
1888
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1888
1889
|
*
|
|
1889
1890
|
*/
|
|
1890
1891
|
async waitForInvisible(locator, sec) {
|
|
@@ -1908,7 +1909,7 @@ class TestCafe extends Helper {
|
|
|
1908
1909
|
* @param {string }text to wait for.
|
|
1909
1910
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1910
1911
|
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
|
|
1911
|
-
*
|
|
1912
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1912
1913
|
*
|
|
1913
1914
|
*
|
|
1914
1915
|
*/
|