codeceptjs 3.3.5-beta.6 → 3.3.6
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 +69 -2
- package/bin/codecept.js +40 -3
- package/docs/basics.md +24 -1
- package/docs/build/Appium.js +41 -22
- package/docs/build/FileSystem.js +1 -1
- package/docs/build/Nightmare.js +106 -57
- package/docs/build/Playwright.js +187 -111
- package/docs/build/Protractor.js +132 -70
- package/docs/build/Puppeteer.js +143 -76
- package/docs/build/REST.js +2 -2
- package/docs/build/TestCafe.js +107 -57
- package/docs/build/WebDriver.js +162 -89
- package/docs/changelog.md +107 -2
- package/docs/commands.md +5 -3
- package/docs/community-helpers.md +7 -4
- package/docs/configuration.md +5 -5
- package/docs/examples.md +39 -48
- package/docs/helpers/Appium.md +25 -23
- package/docs/helpers/FileSystem.md +1 -1
- package/docs/helpers/Nightmare.md +57 -57
- package/docs/helpers/Playwright.md +76 -75
- package/docs/helpers/Puppeteer.md +76 -85
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/TestCafe.md +57 -57
- package/docs/helpers/WebDriver.md +84 -97
- package/docs/quickstart.md +1 -1
- package/docs/reports.md +1 -1
- package/docs/secrets.md +1 -1
- package/docs/typescript.md +9 -69
- package/docs/webapi/appendField.mustache +1 -1
- package/docs/webapi/attachFile.mustache +3 -3
- 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 +1 -1
- package/docs/webapi/executeScript.mustache +1 -1
- package/docs/webapi/fillField.mustache +1 -1
- package/docs/webapi/forceClick.mustache +1 -1
- package/docs/webapi/forceRightClick.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 +2 -2
- package/docs/webapi/saveScreenshot.mustache +2 -2
- 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/command/configMigrate.js +1 -1
- package/lib/command/dryRun.js +2 -1
- package/lib/command/generate.js +35 -18
- package/lib/command/run-rerun.js +38 -0
- package/lib/command/utils.js +13 -3
- package/lib/config.js +2 -2
- package/lib/data/context.js +7 -0
- package/lib/helper/Appium.js +6 -4
- package/lib/helper/FileSystem.js +1 -1
- package/lib/helper/Nightmare.js +1 -1
- package/lib/helper/Playwright.js +48 -38
- package/lib/helper/Protractor.js +1 -1
- package/lib/helper/REST.js +2 -2
- package/lib/helper/TestCafe.js +1 -1
- package/lib/helper/WebDriver.js +7 -7
- package/lib/plugin/wdio.js +11 -2
- package/lib/utils.js +3 -0
- package/package.json +2 -2
- package/typings/index.d.ts +46 -46
- package/typings/types.d.ts +497 -443
- package/docs/wiki/.git/FETCH_HEAD +0 -1
- package/docs/wiki/.git/HEAD +0 -1
- package/docs/wiki/.git/ORIG_HEAD +0 -1
- package/docs/wiki/.git/config +0 -11
- package/docs/wiki/.git/description +0 -1
- package/docs/wiki/.git/hooks/applypatch-msg.sample +0 -15
- package/docs/wiki/.git/hooks/commit-msg.sample +0 -24
- package/docs/wiki/.git/hooks/fsmonitor-watchman.sample +0 -173
- package/docs/wiki/.git/hooks/post-update.sample +0 -8
- package/docs/wiki/.git/hooks/pre-applypatch.sample +0 -14
- package/docs/wiki/.git/hooks/pre-commit.sample +0 -49
- package/docs/wiki/.git/hooks/pre-merge-commit.sample +0 -13
- package/docs/wiki/.git/hooks/pre-push.sample +0 -53
- package/docs/wiki/.git/hooks/pre-rebase.sample +0 -169
- package/docs/wiki/.git/hooks/pre-receive.sample +0 -24
- package/docs/wiki/.git/hooks/prepare-commit-msg.sample +0 -42
- package/docs/wiki/.git/hooks/push-to-checkout.sample +0 -78
- package/docs/wiki/.git/hooks/update.sample +0 -128
- package/docs/wiki/.git/index +0 -0
- package/docs/wiki/.git/info/exclude +0 -6
- package/docs/wiki/.git/logs/HEAD +0 -1
- package/docs/wiki/.git/logs/refs/heads/master +0 -1
- package/docs/wiki/.git/logs/refs/remotes/origin/HEAD +0 -1
- package/docs/wiki/.git/objects/pack/pack-5938044f9d30daf1c195fda4dec1d54850933935.idx +0 -0
- package/docs/wiki/.git/objects/pack/pack-5938044f9d30daf1c195fda4dec1d54850933935.pack +0 -0
- package/docs/wiki/.git/packed-refs +0 -2
- package/docs/wiki/.git/refs/heads/master +0 -1
- package/docs/wiki/.git/refs/remotes/origin/HEAD +0 -1
|
@@ -49,13 +49,14 @@ Type: [object][5]
|
|
|
49
49
|
- `disableScreenshots` **[boolean][25]?** don't save screenshot on failure.
|
|
50
50
|
- `emulate` **any?** browser in device emulation mode.
|
|
51
51
|
- `video` **[boolean][25]?** enables video recording for failed tests; videos are saved into `output/videos` folder
|
|
52
|
+
- `keepVideoForPassedTests` **[boolean][25]?** save videos for passed tests; videos are saved into `output/videos` folder
|
|
52
53
|
- `trace` **[boolean][25]?** record [tracing information][34] with screenshots and snapshots.
|
|
53
54
|
- `fullPageScreenshots` **[boolean][25]?** make full page screenshots on failure.
|
|
54
55
|
- `uniqueScreenshotNames` **[boolean][25]?** option to prevent screenshot override if you have scenarios with the same name in different suites.
|
|
55
56
|
- `keepBrowserState` **[boolean][25]?** keep browser state between tests when `restart` is set to 'session'.
|
|
56
57
|
- `keepCookies` **[boolean][25]?** keep cookies between tests when `restart` is set to 'session'.
|
|
57
58
|
- `waitForAction` **[number][11]?** how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
|
|
58
|
-
- `waitForNavigation` **[
|
|
59
|
+
- `waitForNavigation` **[string][7]?** When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API][35].
|
|
59
60
|
- `pressKeyDelay` **[number][11]?** Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
|
|
60
61
|
- `getPageTimeout` **[number][11]?** config option to set maximum navigation time in milliseconds.
|
|
61
62
|
- `waitForTimeout` **[number][11]?** default wait* timeout in ms. Default: 1000.
|
|
@@ -369,12 +370,12 @@ I.appendField('#myTextField', 'appended');
|
|
|
369
370
|
|
|
370
371
|
- `field` **([string][7] | [object][5])** located by label|name|CSS|XPath|strict locator
|
|
371
372
|
- `value` **[string][7]** text value to append.
|
|
372
|
-
|
|
373
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
373
374
|
|
|
374
375
|
### attachFile
|
|
375
376
|
|
|
376
377
|
Attaches a file to element located by label, name, CSS or XPath
|
|
377
|
-
Path to file is relative current codecept directory (where codecept.
|
|
378
|
+
Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
378
379
|
File will be uploaded to remote system (if tests are running remotely).
|
|
379
380
|
|
|
380
381
|
```js
|
|
@@ -385,8 +386,8 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
|
385
386
|
#### Parameters
|
|
386
387
|
|
|
387
388
|
- `locator` **([string][7] | [object][5])** field located by label|name|CSS|XPath|strict locator.
|
|
388
|
-
- `pathToFile` **[string][7]** local file path relative to codecept.
|
|
389
|
-
|
|
389
|
+
- `pathToFile` **[string][7]** local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
390
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
390
391
|
|
|
391
392
|
### cancelPopup
|
|
392
393
|
|
|
@@ -409,7 +410,7 @@ I.checkOption('agree', '//form');
|
|
|
409
410
|
|
|
410
411
|
- `field` **([string][7] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
411
412
|
- `context` **([string][7]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
412
|
-
|
|
413
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder[Additional options][8] for check available as 3rd argument.Examples:```js
|
|
413
414
|
// click on element at position
|
|
414
415
|
I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
|
|
415
416
|
```> ⚠️ To avoid flakiness, option `force: true` is set by default
|
|
@@ -428,7 +429,7 @@ I.clearCookie('test');
|
|
|
428
429
|
#### Parameters
|
|
429
430
|
|
|
430
431
|
- `cookie` **[string][7]?** (optional, `null` by default) cookie name
|
|
431
|
-
|
|
432
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
432
433
|
|
|
433
434
|
### clearField
|
|
434
435
|
|
|
@@ -444,7 +445,7 @@ I.clearField('#email');
|
|
|
444
445
|
|
|
445
446
|
- `field`
|
|
446
447
|
- `editable` **([string][7] | [object][5])** field located by label|name|CSS|XPath|strict locator.
|
|
447
|
-
|
|
448
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder.
|
|
448
449
|
|
|
449
450
|
### click
|
|
450
451
|
|
|
@@ -474,7 +475,7 @@ I.click({css: 'nav a.login'});
|
|
|
474
475
|
|
|
475
476
|
- `locator` **([string][7] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
476
477
|
- `context` **([string][7]? | [object][5] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
477
|
-
|
|
478
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
478
479
|
- `opts` **any?** [Additional options][9] for click available as 3rd argument.Examples:```js
|
|
479
480
|
// click on element at position
|
|
480
481
|
I.click('canvas', '.model', { position: { x: 20, y: 40 } })
|
|
@@ -522,7 +523,7 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
522
523
|
|
|
523
524
|
- `text` **[string][7]** which is not present.
|
|
524
525
|
- `context` **([string][7] | [object][5])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
525
|
-
|
|
526
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
526
527
|
|
|
527
528
|
### dontSeeCheckboxIsChecked
|
|
528
529
|
|
|
@@ -537,7 +538,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
537
538
|
#### Parameters
|
|
538
539
|
|
|
539
540
|
- `field` **([string][7] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
540
|
-
|
|
541
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
541
542
|
|
|
542
543
|
### dontSeeCookie
|
|
543
544
|
|
|
@@ -550,7 +551,7 @@ I.dontSeeCookie('auth'); // no auth cookie
|
|
|
550
551
|
#### Parameters
|
|
551
552
|
|
|
552
553
|
- `name` **[string][7]** cookie name.
|
|
553
|
-
|
|
554
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
554
555
|
|
|
555
556
|
### dontSeeCurrentUrlEquals
|
|
556
557
|
|
|
@@ -565,7 +566,7 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
|
|
|
565
566
|
#### Parameters
|
|
566
567
|
|
|
567
568
|
- `url` **[string][7]** value to check.
|
|
568
|
-
|
|
569
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
569
570
|
|
|
570
571
|
### dontSeeElement
|
|
571
572
|
|
|
@@ -578,7 +579,7 @@ I.dontSeeElement('.modal'); // modal is not shown
|
|
|
578
579
|
#### Parameters
|
|
579
580
|
|
|
580
581
|
- `locator` **([string][7] | [object][5])** located by CSS|XPath|Strict locator.
|
|
581
|
-
|
|
582
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
582
583
|
|
|
583
584
|
### dontSeeElementInDOM
|
|
584
585
|
|
|
@@ -591,7 +592,7 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
|
|
|
591
592
|
#### Parameters
|
|
592
593
|
|
|
593
594
|
- `locator` **([string][7] | [object][5])** located by CSS|XPath|Strict locator.
|
|
594
|
-
|
|
595
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
595
596
|
|
|
596
597
|
### dontSeeInCurrentUrl
|
|
597
598
|
|
|
@@ -600,7 +601,7 @@ Checks that current url does not contain a provided fragment.
|
|
|
600
601
|
#### Parameters
|
|
601
602
|
|
|
602
603
|
- `url` **[string][7]** value to check.
|
|
603
|
-
|
|
604
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
604
605
|
|
|
605
606
|
### dontSeeInField
|
|
606
607
|
|
|
@@ -616,7 +617,7 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
|
616
617
|
|
|
617
618
|
- `field` **([string][7] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
618
619
|
- `value` **[string][7]** value to check.
|
|
619
|
-
|
|
620
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
620
621
|
|
|
621
622
|
### dontSeeInSource
|
|
622
623
|
|
|
@@ -630,7 +631,7 @@ I.dontSeeInSource('<!--'); // no comments in source
|
|
|
630
631
|
|
|
631
632
|
- `text`
|
|
632
633
|
- `value` **[string][7]** to check.
|
|
633
|
-
|
|
634
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
634
635
|
|
|
635
636
|
### dontSeeInTitle
|
|
636
637
|
|
|
@@ -643,7 +644,7 @@ I.dontSeeInTitle('Error');
|
|
|
643
644
|
#### Parameters
|
|
644
645
|
|
|
645
646
|
- `text` **[string][7]** value to check.
|
|
646
|
-
|
|
647
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
647
648
|
|
|
648
649
|
### doubleClick
|
|
649
650
|
|
|
@@ -661,7 +662,7 @@ I.doubleClick('.btn.edit');
|
|
|
661
662
|
|
|
662
663
|
- `locator` **([string][7] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
663
664
|
- `context` **([string][7]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
664
|
-
|
|
665
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
665
666
|
|
|
666
667
|
### dragAndDrop
|
|
667
668
|
|
|
@@ -675,7 +676,7 @@ I.dragAndDrop('#dragHandle', '#container');
|
|
|
675
676
|
|
|
676
677
|
- `srcElement` **([string][7] | [object][5])** located by CSS|XPath|strict locator.
|
|
677
678
|
- `destElement` **([string][7] | [object][5])** located by CSS|XPath|strict locator.
|
|
678
|
-
|
|
679
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
679
680
|
- `options` **any?** [Additional options][10] can be passed as 3rd argument.```js
|
|
680
681
|
// specify coordinates for source position
|
|
681
682
|
I.dragAndDrop('img.src', 'img.dst', { sourcePosition: {x: 10, y: 10} })
|
|
@@ -695,7 +696,7 @@ I.dragSlider('#slider', -70);
|
|
|
695
696
|
|
|
696
697
|
- `locator` **([string][7] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
697
698
|
- `offsetX` **[number][11]** position to drag.
|
|
698
|
-
|
|
699
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
699
700
|
|
|
700
701
|
### executeScript
|
|
701
702
|
|
|
@@ -745,7 +746,7 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
|
745
746
|
|
|
746
747
|
- `field` **([string][7] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
747
748
|
- `value` **([string][7] | [object][5])** text value to fill.
|
|
748
|
-
|
|
749
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
749
750
|
|
|
750
751
|
### forceClick
|
|
751
752
|
|
|
@@ -778,7 +779,7 @@ I.forceClick({css: 'nav a.login'});
|
|
|
778
779
|
|
|
779
780
|
- `locator` **([string][7] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
780
781
|
- `context` **([string][7]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
781
|
-
|
|
782
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
782
783
|
|
|
783
784
|
### grabAttributeFrom
|
|
784
785
|
|
|
@@ -1192,7 +1193,7 @@ I.moveCursorTo('#submit', 5,5);
|
|
|
1192
1193
|
- `locator` **([string][7] | [object][5])** located by CSS|XPath|strict locator.
|
|
1193
1194
|
- `offsetX` **[number][11]** (optional, `0` by default) X-axis offset.
|
|
1194
1195
|
- `offsetY` **[number][11]** (optional, `0` by default) Y-axis offset.
|
|
1195
|
-
|
|
1196
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1196
1197
|
|
|
1197
1198
|
### openNewTab
|
|
1198
1199
|
|
|
@@ -1277,7 +1278,7 @@ Some of the supported key names are:
|
|
|
1277
1278
|
#### Parameters
|
|
1278
1279
|
|
|
1279
1280
|
- `key` **([string][7] | [Array][14]<[string][7]>)** key or array of keys to press.
|
|
1280
|
-
|
|
1281
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder_Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313][23]).
|
|
1281
1282
|
|
|
1282
1283
|
### pressKeyDown
|
|
1283
1284
|
|
|
@@ -1294,7 +1295,7 @@ I.pressKeyUp('Control');
|
|
|
1294
1295
|
#### Parameters
|
|
1295
1296
|
|
|
1296
1297
|
- `key` **[string][7]** name of key to press down.
|
|
1297
|
-
|
|
1298
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1298
1299
|
|
|
1299
1300
|
### pressKeyUp
|
|
1300
1301
|
|
|
@@ -1311,7 +1312,7 @@ I.pressKeyUp('Control');
|
|
|
1311
1312
|
#### Parameters
|
|
1312
1313
|
|
|
1313
1314
|
- `key` **[string][7]** name of key to release.
|
|
1314
|
-
|
|
1315
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1315
1316
|
|
|
1316
1317
|
### refreshPage
|
|
1317
1318
|
|
|
@@ -1321,7 +1322,7 @@ Reload the current page.
|
|
|
1321
1322
|
I.refreshPage();
|
|
1322
1323
|
```
|
|
1323
1324
|
|
|
1324
|
-
|
|
1325
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1325
1326
|
|
|
1326
1327
|
### resizeWindow
|
|
1327
1328
|
|
|
@@ -1332,7 +1333,7 @@ First parameter can be set to `maximize`.
|
|
|
1332
1333
|
|
|
1333
1334
|
- `width` **[number][11]** width in pixels or `maximize`.
|
|
1334
1335
|
- `height` **[number][11]** height in pixels.
|
|
1335
|
-
|
|
1336
|
+
⚠️ returns a _promise_ which is synchronized internally by recorderUnlike other drivers Playwright changes the size of a viewport, not the window!
|
|
1336
1337
|
Playwright does not control the window of a browser so it can't adjust its real size.
|
|
1337
1338
|
It also can't maximize a window.Update configuration to change real window size on start:```js
|
|
1338
1339
|
// inside codecept.conf.js
|
|
@@ -1357,11 +1358,11 @@ I.rightClick('Click me', '.context');
|
|
|
1357
1358
|
|
|
1358
1359
|
- `locator` **([string][7] | [object][5])** clickable element located by CSS|XPath|strict locator.
|
|
1359
1360
|
- `context` **([string][7]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1360
|
-
|
|
1361
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1361
1362
|
|
|
1362
1363
|
### saveElementScreenshot
|
|
1363
1364
|
|
|
1364
|
-
Saves screenshot of the specified locator to ouput folder (set in codecept.
|
|
1365
|
+
Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
1365
1366
|
Filename is relative to output folder.
|
|
1366
1367
|
|
|
1367
1368
|
```js
|
|
@@ -1372,11 +1373,11 @@ I.saveElementScreenshot(`#submit`,'debug.png');
|
|
|
1372
1373
|
|
|
1373
1374
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1374
1375
|
- `fileName` **[string][7]** file name to save.
|
|
1375
|
-
|
|
1376
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1376
1377
|
|
|
1377
1378
|
### saveScreenshot
|
|
1378
1379
|
|
|
1379
|
-
Saves a screenshot to ouput folder (set in codecept.
|
|
1380
|
+
Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
1380
1381
|
Filename is relative to output folder.
|
|
1381
1382
|
Optionally resize the window to the full available page `scrollHeight` and `scrollWidth` to capture the entire page by passing `true` in as the second argument.
|
|
1382
1383
|
|
|
@@ -1389,7 +1390,7 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
|
|
|
1389
1390
|
|
|
1390
1391
|
- `fileName` **[string][7]** file name to save.
|
|
1391
1392
|
- `fullPage` **[boolean][25]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
1392
|
-
|
|
1393
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1393
1394
|
|
|
1394
1395
|
### scrollPageToBottom
|
|
1395
1396
|
|
|
@@ -1399,7 +1400,7 @@ Scroll page to the bottom.
|
|
|
1399
1400
|
I.scrollPageToBottom();
|
|
1400
1401
|
```
|
|
1401
1402
|
|
|
1402
|
-
|
|
1403
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1403
1404
|
|
|
1404
1405
|
### scrollPageToTop
|
|
1405
1406
|
|
|
@@ -1409,7 +1410,7 @@ Scroll page to the top.
|
|
|
1409
1410
|
I.scrollPageToTop();
|
|
1410
1411
|
```
|
|
1411
1412
|
|
|
1412
|
-
|
|
1413
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1413
1414
|
|
|
1414
1415
|
### scrollTo
|
|
1415
1416
|
|
|
@@ -1426,7 +1427,7 @@ I.scrollTo('#submit', 5, 5);
|
|
|
1426
1427
|
- `locator` **([string][7] | [object][5])** located by CSS|XPath|strict locator.
|
|
1427
1428
|
- `offsetX` **[number][11]** (optional, `0` by default) X-axis offset.
|
|
1428
1429
|
- `offsetY` **[number][11]** (optional, `0` by default) Y-axis offset.
|
|
1429
|
-
|
|
1430
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1430
1431
|
|
|
1431
1432
|
### see
|
|
1432
1433
|
|
|
@@ -1443,7 +1444,7 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
1443
1444
|
|
|
1444
1445
|
- `text` **[string][7]** expected on page.
|
|
1445
1446
|
- `context` **([string][7]? | [object][5])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1446
|
-
|
|
1447
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1447
1448
|
|
|
1448
1449
|
### seeAttributesOnElements
|
|
1449
1450
|
|
|
@@ -1457,7 +1458,7 @@ I.seeAttributesOnElements('//form', { method: "post"});
|
|
|
1457
1458
|
|
|
1458
1459
|
- `locator` **([string][7] | [object][5])** located by CSS|XPath|strict locator.
|
|
1459
1460
|
- `attributes` **[object][5]** attributes and their values to check.
|
|
1460
|
-
|
|
1461
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1461
1462
|
|
|
1462
1463
|
### seeCheckboxIsChecked
|
|
1463
1464
|
|
|
@@ -1472,7 +1473,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
1472
1473
|
#### Parameters
|
|
1473
1474
|
|
|
1474
1475
|
- `field` **([string][7] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
1475
|
-
|
|
1476
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1476
1477
|
|
|
1477
1478
|
### seeCookie
|
|
1478
1479
|
|
|
@@ -1485,7 +1486,7 @@ I.seeCookie('Auth');
|
|
|
1485
1486
|
#### Parameters
|
|
1486
1487
|
|
|
1487
1488
|
- `name` **[string][7]** cookie name.
|
|
1488
|
-
|
|
1489
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1489
1490
|
|
|
1490
1491
|
### seeCssPropertiesOnElements
|
|
1491
1492
|
|
|
@@ -1499,7 +1500,7 @@ I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
|
|
|
1499
1500
|
|
|
1500
1501
|
- `locator` **([string][7] | [object][5])** located by CSS|XPath|strict locator.
|
|
1501
1502
|
- `cssProperties` **[object][5]** object with CSS properties and their values to check.
|
|
1502
|
-
|
|
1503
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1503
1504
|
|
|
1504
1505
|
### seeCurrentUrlEquals
|
|
1505
1506
|
|
|
@@ -1515,7 +1516,7 @@ I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
|
1515
1516
|
#### Parameters
|
|
1516
1517
|
|
|
1517
1518
|
- `url` **[string][7]** value to check.
|
|
1518
|
-
|
|
1519
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1519
1520
|
|
|
1520
1521
|
### seeElement
|
|
1521
1522
|
|
|
@@ -1529,7 +1530,7 @@ I.seeElement('#modal');
|
|
|
1529
1530
|
#### Parameters
|
|
1530
1531
|
|
|
1531
1532
|
- `locator` **([string][7] | [object][5])** located by CSS|XPath|strict locator.
|
|
1532
|
-
|
|
1533
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1533
1534
|
|
|
1534
1535
|
### seeElementInDOM
|
|
1535
1536
|
|
|
@@ -1543,7 +1544,7 @@ I.seeElementInDOM('#modal');
|
|
|
1543
1544
|
#### Parameters
|
|
1544
1545
|
|
|
1545
1546
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1546
|
-
|
|
1547
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1547
1548
|
|
|
1548
1549
|
### seeInCurrentUrl
|
|
1549
1550
|
|
|
@@ -1556,7 +1557,7 @@ I.seeInCurrentUrl('/register'); // we are on registration page
|
|
|
1556
1557
|
#### Parameters
|
|
1557
1558
|
|
|
1558
1559
|
- `url` **[string][7]** a fragment to check
|
|
1559
|
-
|
|
1560
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1560
1561
|
|
|
1561
1562
|
### seeInField
|
|
1562
1563
|
|
|
@@ -1574,7 +1575,7 @@ I.seeInField('#searchform input','Search');
|
|
|
1574
1575
|
|
|
1575
1576
|
- `field` **([string][7] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
1576
1577
|
- `value` **[string][7]** value to check.
|
|
1577
|
-
|
|
1578
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1578
1579
|
|
|
1579
1580
|
### seeInPopup
|
|
1580
1581
|
|
|
@@ -1588,7 +1589,7 @@ I.seeInPopup('Popup text');
|
|
|
1588
1589
|
#### Parameters
|
|
1589
1590
|
|
|
1590
1591
|
- `text` **[string][7]** value to check.
|
|
1591
|
-
|
|
1592
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1592
1593
|
|
|
1593
1594
|
### seeInSource
|
|
1594
1595
|
|
|
@@ -1601,7 +1602,7 @@ I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
|
1601
1602
|
#### Parameters
|
|
1602
1603
|
|
|
1603
1604
|
- `text` **[string][7]** value to check.
|
|
1604
|
-
|
|
1605
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1605
1606
|
|
|
1606
1607
|
### seeInTitle
|
|
1607
1608
|
|
|
@@ -1614,7 +1615,7 @@ I.seeInTitle('Home Page');
|
|
|
1614
1615
|
#### Parameters
|
|
1615
1616
|
|
|
1616
1617
|
- `text` **[string][7]** text value to check.
|
|
1617
|
-
|
|
1618
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1618
1619
|
|
|
1619
1620
|
### seeNumberOfElements
|
|
1620
1621
|
|
|
@@ -1629,7 +1630,7 @@ I.seeNumberOfElements('#submitBtn', 1);
|
|
|
1629
1630
|
|
|
1630
1631
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1631
1632
|
- `num` **[number][11]** number of elements.
|
|
1632
|
-
|
|
1633
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1633
1634
|
|
|
1634
1635
|
### seeNumberOfVisibleElements
|
|
1635
1636
|
|
|
@@ -1644,7 +1645,7 @@ I.seeNumberOfVisibleElements('.buttons', 3);
|
|
|
1644
1645
|
|
|
1645
1646
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1646
1647
|
- `num` **[number][11]** number of elements.
|
|
1647
|
-
|
|
1648
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1648
1649
|
|
|
1649
1650
|
### seeTextEquals
|
|
1650
1651
|
|
|
@@ -1658,7 +1659,7 @@ I.seeTextEquals('text', 'h1');
|
|
|
1658
1659
|
|
|
1659
1660
|
- `text` **[string][7]** element value to check.
|
|
1660
1661
|
- `context` **([string][7] | [object][5])?** element located by CSS|XPath|strict locator.
|
|
1661
|
-
|
|
1662
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1662
1663
|
|
|
1663
1664
|
### seeTitleEquals
|
|
1664
1665
|
|
|
@@ -1671,7 +1672,7 @@ I.seeTitleEquals('Test title.');
|
|
|
1671
1672
|
#### Parameters
|
|
1672
1673
|
|
|
1673
1674
|
- `text` **[string][7]** value to check.
|
|
1674
|
-
|
|
1675
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1675
1676
|
|
|
1676
1677
|
### selectOption
|
|
1677
1678
|
|
|
@@ -1698,7 +1699,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
1698
1699
|
|
|
1699
1700
|
- `select` **([string][7] | [object][5])** field located by label|name|CSS|XPath|strict locator.
|
|
1700
1701
|
- `option` **([string][7] | [Array][14]<any>)** visible text or value of option.
|
|
1701
|
-
|
|
1702
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1702
1703
|
|
|
1703
1704
|
### setCookie
|
|
1704
1705
|
|
|
@@ -1719,7 +1720,7 @@ I.setCookie([
|
|
|
1719
1720
|
#### Parameters
|
|
1720
1721
|
|
|
1721
1722
|
- `cookie` **(Cookie | [Array][14]<Cookie>)** a cookie object or array of cookie objects.
|
|
1722
|
-
|
|
1723
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1723
1724
|
|
|
1724
1725
|
### stopMockingRoute
|
|
1725
1726
|
|
|
@@ -1749,7 +1750,7 @@ I.switchTo(); // switch back to main page
|
|
|
1749
1750
|
#### Parameters
|
|
1750
1751
|
|
|
1751
1752
|
- `locator` **([string][7]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1752
|
-
|
|
1753
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1753
1754
|
|
|
1754
1755
|
### switchToNextTab
|
|
1755
1756
|
|
|
@@ -1798,7 +1799,7 @@ I.type(['T', 'E', 'X', 'T']);
|
|
|
1798
1799
|
|
|
1799
1800
|
- `keys`
|
|
1800
1801
|
- `delay` **[number][11]?** (optional) delay in ms between key presses
|
|
1801
|
-
|
|
1802
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1802
1803
|
- `key` **([string][7] | [Array][14]<[string][7]>)** or array of keys to type.
|
|
1803
1804
|
|
|
1804
1805
|
### uncheckOption
|
|
@@ -1818,7 +1819,7 @@ I.uncheckOption('agree', '//form');
|
|
|
1818
1819
|
|
|
1819
1820
|
- `field` **([string][7] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
1820
1821
|
- `context` **([string][7]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1821
|
-
|
|
1822
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder[Additional options][26] for uncheck available as 3rd argument.Examples:```js
|
|
1822
1823
|
// click on element at position
|
|
1823
1824
|
I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
|
|
1824
1825
|
```> ⚠️ To avoid flakiness, option `force: true` is set by default
|
|
@@ -1855,7 +1856,7 @@ I.wait(2); // wait 2 secs
|
|
|
1855
1856
|
#### Parameters
|
|
1856
1857
|
|
|
1857
1858
|
- `sec` **[number][11]** number of second to wait.
|
|
1858
|
-
|
|
1859
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1859
1860
|
|
|
1860
1861
|
### waitForClickable
|
|
1861
1862
|
|
|
@@ -1872,7 +1873,7 @@ I.waitForClickable('.btn.continue', 5); // wait for 5 secs
|
|
|
1872
1873
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1873
1874
|
- `waitTimeout`
|
|
1874
1875
|
- `sec` **[number][11]?** (optional, `1` by default) time in seconds to wait
|
|
1875
|
-
|
|
1876
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1876
1877
|
|
|
1877
1878
|
### waitForDetached
|
|
1878
1879
|
|
|
@@ -1887,7 +1888,7 @@ I.waitForDetached('#popup');
|
|
|
1887
1888
|
|
|
1888
1889
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1889
1890
|
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait
|
|
1890
|
-
|
|
1891
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1891
1892
|
|
|
1892
1893
|
### waitForElement
|
|
1893
1894
|
|
|
@@ -1903,7 +1904,7 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
1903
1904
|
|
|
1904
1905
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1905
1906
|
- `sec` **[number][11]?** (optional, `1` by default) time in seconds to wait
|
|
1906
|
-
|
|
1907
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1907
1908
|
|
|
1908
1909
|
### waitForEnabled
|
|
1909
1910
|
|
|
@@ -1914,7 +1915,7 @@ Element can be located by CSS or XPath.
|
|
|
1914
1915
|
|
|
1915
1916
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1916
1917
|
- `sec` **[number][11]** (optional) time in seconds to wait, 1 by default.
|
|
1917
|
-
|
|
1918
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1918
1919
|
|
|
1919
1920
|
### waitForFunction
|
|
1920
1921
|
|
|
@@ -1936,7 +1937,7 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
|
|
|
1936
1937
|
- `fn` **([string][7] | [function][12])** to be executed in browser context.
|
|
1937
1938
|
- `argsOrSec` **([Array][14]<any> | [number][11])?** (optional, `1` by default) arguments for function or seconds.
|
|
1938
1939
|
- `sec` **[number][11]?** (optional, `1` by default) time in seconds to wait
|
|
1939
|
-
|
|
1940
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1940
1941
|
|
|
1941
1942
|
### waitForInvisible
|
|
1942
1943
|
|
|
@@ -1951,7 +1952,7 @@ I.waitForInvisible('#popup');
|
|
|
1951
1952
|
|
|
1952
1953
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1953
1954
|
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait
|
|
1954
|
-
|
|
1955
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1955
1956
|
|
|
1956
1957
|
### waitForNavigation
|
|
1957
1958
|
|
|
@@ -2007,7 +2008,7 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
2007
2008
|
- `text` **[string][7]** to wait for.
|
|
2008
2009
|
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait
|
|
2009
2010
|
- `context` **([string][7] | [object][5])?** (optional) element located by CSS|XPath|strict locator.
|
|
2010
|
-
|
|
2011
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2011
2012
|
|
|
2012
2013
|
### waitForValue
|
|
2013
2014
|
|
|
@@ -2022,7 +2023,7 @@ I.waitForValue('//input', "GoodValue");
|
|
|
2022
2023
|
- `field` **([string][7] | [object][5])** input field.
|
|
2023
2024
|
- `value` **[string][7]** expected value.
|
|
2024
2025
|
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait
|
|
2025
|
-
|
|
2026
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2026
2027
|
|
|
2027
2028
|
### waitForVisible
|
|
2028
2029
|
|
|
@@ -2037,7 +2038,7 @@ I.waitForVisible('#popup');
|
|
|
2037
2038
|
|
|
2038
2039
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
2039
2040
|
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait
|
|
2040
|
-
|
|
2041
|
+
⚠️ returns a _promise_ which is synchronized internally by recorderThis method accepts [React selectors][31].
|
|
2041
2042
|
|
|
2042
2043
|
### waitInUrl
|
|
2043
2044
|
|
|
@@ -2051,7 +2052,7 @@ I.waitInUrl('/info', 2);
|
|
|
2051
2052
|
|
|
2052
2053
|
- `urlPart` **[string][7]** value to check.
|
|
2053
2054
|
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait
|
|
2054
|
-
|
|
2055
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2055
2056
|
|
|
2056
2057
|
### waitNumberOfVisibleElements
|
|
2057
2058
|
|
|
@@ -2066,7 +2067,7 @@ I.waitNumberOfVisibleElements('a', 3);
|
|
|
2066
2067
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
2067
2068
|
- `num` **[number][11]** number of elements.
|
|
2068
2069
|
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait
|
|
2069
|
-
|
|
2070
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2070
2071
|
|
|
2071
2072
|
### waitToHide
|
|
2072
2073
|
|
|
@@ -2081,7 +2082,7 @@ I.waitToHide('#popup');
|
|
|
2081
2082
|
|
|
2082
2083
|
- `locator` **([string][7] | [object][5])** element located by CSS|XPath|strict locator.
|
|
2083
2084
|
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait
|
|
2084
|
-
|
|
2085
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2085
2086
|
|
|
2086
2087
|
### waitUrlEquals
|
|
2087
2088
|
|
|
@@ -2096,7 +2097,7 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
|
|
|
2096
2097
|
|
|
2097
2098
|
- `urlPart` **[string][7]** value to check.
|
|
2098
2099
|
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait
|
|
2099
|
-
|
|
2100
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2100
2101
|
|
|
2101
2102
|
: https://github.com/microsoft/playwright
|
|
2102
2103
|
|
|
@@ -2166,6 +2167,6 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
|
|
|
2166
2167
|
|
|
2167
2168
|
[34]: https://playwright.dev/docs/trace-viewer
|
|
2168
2169
|
|
|
2169
|
-
[35]: https://
|
|
2170
|
+
[35]: https://playwright.dev/docs/api/class-page#page-wait-for-navigation
|
|
2170
2171
|
|
|
2171
2172
|
[36]: https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge
|