codeceptjs 3.2.3 → 3.3.0-beta.4
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 +50 -0
- package/docs/advanced.md +0 -4
- package/docs/api.md +227 -188
- package/docs/build/ApiDataFactory.js +13 -6
- package/docs/build/Appium.js +36 -36
- package/docs/build/GraphQL.js +11 -0
- package/docs/build/JSONResponse.js +297 -0
- package/docs/build/Nightmare.js +48 -48
- package/docs/build/Playwright.js +261 -146
- package/docs/build/Puppeteer.js +76 -67
- package/docs/build/REST.js +36 -0
- package/docs/build/TestCafe.js +44 -44
- package/docs/build/WebDriver.js +69 -69
- package/docs/helpers/ApiDataFactory.md +7 -0
- package/docs/helpers/Appium.md +3 -3
- package/docs/helpers/JSONResponse.md +230 -0
- package/docs/helpers/Playwright.md +282 -218
- package/docs/helpers/Puppeteer.md +9 -1
- package/docs/helpers/REST.md +30 -9
- package/docs/installation.md +2 -0
- package/docs/internal-api.md +265 -0
- package/docs/playwright.md +70 -15
- package/docs/plugins.md +125 -29
- package/docs/puppeteer.md +24 -8
- package/docs/quickstart.md +2 -3
- package/docs/reports.md +43 -2
- package/docs/translation.md +1 -1
- package/docs/videos.md +2 -2
- package/docs/webdriver.md +90 -2
- package/lib/command/init.js +5 -15
- package/lib/config.js +17 -13
- package/lib/helper/ApiDataFactory.js +13 -6
- package/lib/helper/Appium.js +3 -3
- package/lib/helper/GraphQL.js +11 -0
- package/lib/helper/JSONResponse.js +297 -0
- package/lib/helper/Playwright.js +199 -84
- package/lib/helper/Puppeteer.js +12 -3
- package/lib/helper/REST.js +36 -0
- package/lib/helper/extras/Console.js +8 -0
- package/lib/helper/extras/PlaywrightRestartOpts.js +35 -0
- package/lib/interfaces/bdd.js +3 -1
- package/lib/plugin/allure.js +12 -0
- package/lib/plugin/eachElement.js +127 -0
- package/lib/utils.js +20 -0
- package/package.json +24 -23
- package/translations/pt-BR.js +8 -0
- package/typings/index.d.ts +2 -0
- package/typings/types.d.ts +237 -11
|
@@ -19,9 +19,15 @@ Uses [Playwright][1] library to run tests inside:
|
|
|
19
19
|
|
|
20
20
|
This helper works with a browser out of the box with no additional tools required to install.
|
|
21
21
|
|
|
22
|
-
Requires `playwright` package version ^1 to be installed:
|
|
22
|
+
Requires `playwright` or `playwright-core` package version ^1 to be installed:
|
|
23
23
|
|
|
24
|
-
npm i playwright@^1 --save
|
|
24
|
+
npm i playwright@^1.18 --save
|
|
25
|
+
|
|
26
|
+
or
|
|
27
|
+
|
|
28
|
+
npm i playwright-core@^1.18 --save
|
|
29
|
+
|
|
30
|
+
Using playwright-core package, will prevent the download of browser binaries and allow connecting to an existing browser installation or for connecting to a remote one.
|
|
25
31
|
|
|
26
32
|
## Configuration
|
|
27
33
|
|
|
@@ -30,17 +36,21 @@ This helper should be configured in codecept.json or codecept.conf.js
|
|
|
30
36
|
- `url`: base url of website to be tested
|
|
31
37
|
- `browser`: a browser to test on, either: `chromium`, `firefox`, `webkit`, `electron`. Default: chromium.
|
|
32
38
|
- `show`: - show browser window.
|
|
33
|
-
- `restart`: - restart
|
|
39
|
+
- `restart`: - restart strategy between tests. Possible values:
|
|
40
|
+
- 'context' or **false** - restarts [browser context][2] but keeps running browser. Recommended by Playwright team to keep tests isolated.
|
|
41
|
+
- 'browser' or **true** - closes browser and opens it again between tests.
|
|
42
|
+
- 'session' or 'keep' - keeps browser context and session, but cleans up cookies and localStorage between tests. The fastest option when running tests in windowed mode. Works with `keepCookies` and `keepBrowserState` options. This behavior was default before CodeceptJS 3.1
|
|
43
|
+
- `timeout`: - [timeout][3] in ms of all Playwright actions .
|
|
34
44
|
- `disableScreenshots`: - don't save screenshot on failure.
|
|
35
45
|
- `emulate`: launch browser in device emulation mode.
|
|
36
46
|
- `video`: enables video recording for failed tests; videos are saved into `output/videos` folder
|
|
37
|
-
- `trace`: record [tracing information][
|
|
47
|
+
- `trace`: record [tracing information][4] with screenshots and snapshots.
|
|
38
48
|
- `fullPageScreenshots` - make full page screenshots on failure.
|
|
39
49
|
- `uniqueScreenshotNames`: - option to prevent screenshot override if you have scenarios with the same name in different suites.
|
|
40
|
-
- `keepBrowserState`: - keep browser state between tests when `restart` is set to
|
|
41
|
-
- `keepCookies`: - keep cookies between tests when `restart` is set to
|
|
50
|
+
- `keepBrowserState`: - keep browser state between tests when `restart` is set to 'session'.
|
|
51
|
+
- `keepCookies`: - keep cookies between tests when `restart` is set to 'session'.
|
|
42
52
|
- `waitForAction`: (optional) how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
|
|
43
|
-
- `waitForNavigation`: . When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API][
|
|
53
|
+
- `waitForNavigation`: . When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API][5].
|
|
44
54
|
- `pressKeyDelay`: . Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
|
|
45
55
|
- `getPageTimeout` config option to set maximum navigation time in milliseconds.
|
|
46
56
|
- `waitForTimeout`: (optional) default wait* timeout in ms. Default: 1000.
|
|
@@ -51,7 +61,7 @@ This helper should be configured in codecept.json or codecept.conf.js
|
|
|
51
61
|
- `manualStart`: - do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
|
|
52
62
|
- `chromium`: (optional) pass additional chromium options
|
|
53
63
|
- `electron`: (optional) pass additional electron options
|
|
54
|
-
- `channel`: (optional) While Playwright can operate against the stock Google Chrome and Microsoft Edge browsers available on the machine. In particular, current Playwright version will support Stable and Beta channels of these browsers. See [Google Chrome & Microsoft Edge][
|
|
64
|
+
- `channel`: (optional) While Playwright can operate against the stock Google Chrome and Microsoft Edge browsers available on the machine. In particular, current Playwright version will support Stable and Beta channels of these browsers. See [Google Chrome & Microsoft Edge][6].
|
|
55
65
|
|
|
56
66
|
#### Video Recording Customization
|
|
57
67
|
|
|
@@ -59,7 +69,7 @@ By default, video is saved to `output/video` dir. You can customize this path by
|
|
|
59
69
|
|
|
60
70
|
- `video`: enables video recording for failed tests; videos are saved into `output/videos` folder
|
|
61
71
|
- `keepVideoForPassedTests`: - save videos for passed tests
|
|
62
|
-
- `recordVideo`: [additional options for videos customization][
|
|
72
|
+
- `recordVideo`: [additional options for videos customization][7]
|
|
63
73
|
|
|
64
74
|
#### Trace Recording Customization
|
|
65
75
|
|
|
@@ -112,7 +122,7 @@ Traces will be saved to `output/trace`
|
|
|
112
122
|
}
|
|
113
123
|
```
|
|
114
124
|
|
|
115
|
-
#### Example #4: Connect to remote browser by specifying [websocket endpoint][
|
|
125
|
+
#### Example #4: Connect to remote browser by specifying [websocket endpoint][8]
|
|
116
126
|
|
|
117
127
|
```js
|
|
118
128
|
{
|
|
@@ -129,7 +139,7 @@ Traces will be saved to `output/trace`
|
|
|
129
139
|
|
|
130
140
|
#### Example #5: Testing with Chromium extensions
|
|
131
141
|
|
|
132
|
-
[official docs][
|
|
142
|
+
[official docs][9]
|
|
133
143
|
|
|
134
144
|
```js
|
|
135
145
|
{
|
|
@@ -278,13 +288,13 @@ Set current page
|
|
|
278
288
|
|
|
279
289
|
#### Parameters
|
|
280
290
|
|
|
281
|
-
- `page` **[object][
|
|
291
|
+
- `page` **[object][10]** page to set
|
|
282
292
|
|
|
283
293
|
### acceptPopup
|
|
284
294
|
|
|
285
295
|
Accepts the active JavaScript native popup window, as created by window.alert|window.confirm|window.prompt.
|
|
286
296
|
Don't confuse popups with modal windows, as created by [various
|
|
287
|
-
libraries][
|
|
297
|
+
libraries][11].
|
|
288
298
|
|
|
289
299
|
### amAcceptingPopups
|
|
290
300
|
|
|
@@ -321,7 +331,7 @@ I.amOnPage('/login'); // opens a login page
|
|
|
321
331
|
|
|
322
332
|
#### Parameters
|
|
323
333
|
|
|
324
|
-
- `url` **[string][
|
|
334
|
+
- `url` **[string][12]** url path or global url.
|
|
325
335
|
|
|
326
336
|
### appendField
|
|
327
337
|
|
|
@@ -334,8 +344,8 @@ I.appendField('#myTextField', 'appended');
|
|
|
334
344
|
|
|
335
345
|
#### Parameters
|
|
336
346
|
|
|
337
|
-
- `field` **([string][
|
|
338
|
-
- `value` **[string][
|
|
347
|
+
- `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator
|
|
348
|
+
- `value` **[string][12]** text value to append.
|
|
339
349
|
|
|
340
350
|
### attachFile
|
|
341
351
|
|
|
@@ -350,8 +360,8 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
|
350
360
|
|
|
351
361
|
#### Parameters
|
|
352
362
|
|
|
353
|
-
- `locator` **([string][
|
|
354
|
-
- `pathToFile` **[string][
|
|
363
|
+
- `locator` **([string][12] | [object][10])** field located by label|name|CSS|XPath|strict locator.
|
|
364
|
+
- `pathToFile` **[string][12]** local file path relative to codecept.json config file.
|
|
355
365
|
|
|
356
366
|
### cancelPopup
|
|
357
367
|
|
|
@@ -372,8 +382,12 @@ I.checkOption('agree', '//form');
|
|
|
372
382
|
|
|
373
383
|
#### Parameters
|
|
374
384
|
|
|
375
|
-
- `field` **([string][
|
|
376
|
-
- `context` **([string][
|
|
385
|
+
- `field` **([string][12] | [object][10])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
386
|
+
- `context` **([string][12]? | [object][10])** (optional, `null` by default) element located by CSS | XPath | strict locator.[Additional options][13] for check available as 3rd argument.Examples:```js
|
|
387
|
+
// click on element at position
|
|
388
|
+
I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
|
|
389
|
+
```> ⚠️ To avoid flakiness, option `force: true` is set by default
|
|
390
|
+
- `options`
|
|
377
391
|
|
|
378
392
|
### clearCookie
|
|
379
393
|
|
|
@@ -387,7 +401,7 @@ I.clearCookie('test');
|
|
|
387
401
|
|
|
388
402
|
#### Parameters
|
|
389
403
|
|
|
390
|
-
- `cookie` **[string][
|
|
404
|
+
- `cookie` **[string][12]?** (optional, `null` by default) cookie name
|
|
391
405
|
|
|
392
406
|
### clearField
|
|
393
407
|
|
|
@@ -402,7 +416,7 @@ I.clearField('#email');
|
|
|
402
416
|
#### Parameters
|
|
403
417
|
|
|
404
418
|
- `field`
|
|
405
|
-
- `editable` **([string][
|
|
419
|
+
- `editable` **([string][12] | [object][10])** field located by label|name|CSS|XPath|strict locator.
|
|
406
420
|
|
|
407
421
|
### click
|
|
408
422
|
|
|
@@ -430,8 +444,15 @@ I.click({css: 'nav a.login'});
|
|
|
430
444
|
|
|
431
445
|
#### Parameters
|
|
432
446
|
|
|
433
|
-
- `locator` **([string][
|
|
434
|
-
- `context` **([string][
|
|
447
|
+
- `locator` **([string][12] | [object][10])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
448
|
+
- `context` **([string][12]? | [object][10])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.[Additional options][14] for click available as 3rd argument.Examples:```js
|
|
449
|
+
// click on element at position
|
|
450
|
+
I.click('canvas', '.model', { position: { x: 20, y: 40 } })
|
|
451
|
+
|
|
452
|
+
// make ctrl-click
|
|
453
|
+
I.click('.edit', null, { modifiers: ['Ctrl'] } )
|
|
454
|
+
```
|
|
455
|
+
- `opts`
|
|
435
456
|
|
|
436
457
|
### clickLink
|
|
437
458
|
|
|
@@ -470,8 +491,8 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
470
491
|
|
|
471
492
|
#### Parameters
|
|
472
493
|
|
|
473
|
-
- `text` **[string][
|
|
474
|
-
- `context` **([string][
|
|
494
|
+
- `text` **[string][12]** which is not present.
|
|
495
|
+
- `context` **([string][12] | [object][10])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
475
496
|
|
|
476
497
|
### dontSeeCheckboxIsChecked
|
|
477
498
|
|
|
@@ -485,7 +506,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
485
506
|
|
|
486
507
|
#### Parameters
|
|
487
508
|
|
|
488
|
-
- `field` **([string][
|
|
509
|
+
- `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
|
|
489
510
|
|
|
490
511
|
### dontSeeCookie
|
|
491
512
|
|
|
@@ -497,7 +518,7 @@ I.dontSeeCookie('auth'); // no auth cookie
|
|
|
497
518
|
|
|
498
519
|
#### Parameters
|
|
499
520
|
|
|
500
|
-
- `name` **[string][
|
|
521
|
+
- `name` **[string][12]** cookie name.
|
|
501
522
|
|
|
502
523
|
### dontSeeCurrentUrlEquals
|
|
503
524
|
|
|
@@ -511,7 +532,7 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
|
|
|
511
532
|
|
|
512
533
|
#### Parameters
|
|
513
534
|
|
|
514
|
-
- `url` **[string][
|
|
535
|
+
- `url` **[string][12]** value to check.
|
|
515
536
|
|
|
516
537
|
### dontSeeElement
|
|
517
538
|
|
|
@@ -523,7 +544,7 @@ I.dontSeeElement('.modal'); // modal is not shown
|
|
|
523
544
|
|
|
524
545
|
#### Parameters
|
|
525
546
|
|
|
526
|
-
- `locator` **([string][
|
|
547
|
+
- `locator` **([string][12] | [object][10])** located by CSS|XPath|Strict locator.
|
|
527
548
|
|
|
528
549
|
### dontSeeElementInDOM
|
|
529
550
|
|
|
@@ -535,7 +556,7 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
|
|
|
535
556
|
|
|
536
557
|
#### Parameters
|
|
537
558
|
|
|
538
|
-
- `locator` **([string][
|
|
559
|
+
- `locator` **([string][12] | [object][10])** located by CSS|XPath|Strict locator.
|
|
539
560
|
|
|
540
561
|
### dontSeeInCurrentUrl
|
|
541
562
|
|
|
@@ -543,7 +564,7 @@ Checks that current url does not contain a provided fragment.
|
|
|
543
564
|
|
|
544
565
|
#### Parameters
|
|
545
566
|
|
|
546
|
-
- `url` **[string][
|
|
567
|
+
- `url` **[string][12]** value to check.
|
|
547
568
|
|
|
548
569
|
### dontSeeInField
|
|
549
570
|
|
|
@@ -557,8 +578,8 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
|
557
578
|
|
|
558
579
|
#### Parameters
|
|
559
580
|
|
|
560
|
-
- `field` **([string][
|
|
561
|
-
- `value` **[string][
|
|
581
|
+
- `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
|
|
582
|
+
- `value` **[string][12]** value to check.
|
|
562
583
|
|
|
563
584
|
### dontSeeInSource
|
|
564
585
|
|
|
@@ -571,7 +592,7 @@ I.dontSeeInSource('<!--'); // no comments in source
|
|
|
571
592
|
#### Parameters
|
|
572
593
|
|
|
573
594
|
- `text`
|
|
574
|
-
- `value` **[string][
|
|
595
|
+
- `value` **[string][12]** to check.
|
|
575
596
|
|
|
576
597
|
### dontSeeInTitle
|
|
577
598
|
|
|
@@ -583,7 +604,7 @@ I.dontSeeInTitle('Error');
|
|
|
583
604
|
|
|
584
605
|
#### Parameters
|
|
585
606
|
|
|
586
|
-
- `text` **[string][
|
|
607
|
+
- `text` **[string][12]** value to check.
|
|
587
608
|
|
|
588
609
|
### doubleClick
|
|
589
610
|
|
|
@@ -599,8 +620,8 @@ I.doubleClick('.btn.edit');
|
|
|
599
620
|
|
|
600
621
|
#### Parameters
|
|
601
622
|
|
|
602
|
-
- `locator` **([string][
|
|
603
|
-
- `context` **([string][
|
|
623
|
+
- `locator` **([string][12] | [object][10])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
624
|
+
- `context` **([string][12]? | [object][10])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
604
625
|
|
|
605
626
|
### dragAndDrop
|
|
606
627
|
|
|
@@ -612,8 +633,12 @@ I.dragAndDrop('#dragHandle', '#container');
|
|
|
612
633
|
|
|
613
634
|
#### Parameters
|
|
614
635
|
|
|
615
|
-
- `srcElement` **([string][
|
|
616
|
-
- `destElement` **([string][
|
|
636
|
+
- `srcElement` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
|
|
637
|
+
- `destElement` **([string][12] | [object][10])** located by CSS|XPath|strict locator.[Additional options][15] can be passed as 3rd argument.```js
|
|
638
|
+
// specify coordinates for source position
|
|
639
|
+
I.dragAndDrop('img.src', 'img.dst', { sourcePosition: {x: 10, y: 10} })
|
|
640
|
+
```> By default option `force: true` is set
|
|
641
|
+
- `options`
|
|
617
642
|
|
|
618
643
|
### dragSlider
|
|
619
644
|
|
|
@@ -627,8 +652,8 @@ I.dragSlider('#slider', -70);
|
|
|
627
652
|
|
|
628
653
|
#### Parameters
|
|
629
654
|
|
|
630
|
-
- `locator` **([string][
|
|
631
|
-
- `offsetX` **[number][
|
|
655
|
+
- `locator` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
|
|
656
|
+
- `offsetX` **[number][16]** position to drag.
|
|
632
657
|
|
|
633
658
|
### executeScript
|
|
634
659
|
|
|
@@ -655,10 +680,10 @@ If a function returns a Promise it will wait for its resolution.
|
|
|
655
680
|
|
|
656
681
|
#### Parameters
|
|
657
682
|
|
|
658
|
-
- `fn` **([string][
|
|
683
|
+
- `fn` **([string][12] | [function][17])** function to be executed in browser context.
|
|
659
684
|
- `arg` **any?** optional argument to pass to the function
|
|
660
685
|
|
|
661
|
-
Returns **[Promise][
|
|
686
|
+
Returns **[Promise][18]<any>**
|
|
662
687
|
|
|
663
688
|
### fillField
|
|
664
689
|
|
|
@@ -678,8 +703,8 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
|
678
703
|
|
|
679
704
|
#### Parameters
|
|
680
705
|
|
|
681
|
-
- `field` **([string][
|
|
682
|
-
- `value` **([string][
|
|
706
|
+
- `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
|
|
707
|
+
- `value` **([string][12] | [object][10])** text value to fill.
|
|
683
708
|
|
|
684
709
|
### forceClick
|
|
685
710
|
|
|
@@ -710,8 +735,8 @@ I.forceClick({css: 'nav a.login'});
|
|
|
710
735
|
|
|
711
736
|
#### Parameters
|
|
712
737
|
|
|
713
|
-
- `locator` **([string][
|
|
714
|
-
- `context` **([string][
|
|
738
|
+
- `locator` **([string][12] | [object][10])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
739
|
+
- `context` **([string][12]? | [object][10])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
715
740
|
|
|
716
741
|
### grabAttributeFrom
|
|
717
742
|
|
|
@@ -725,10 +750,10 @@ let hint = await I.grabAttributeFrom('#tooltip', 'title');
|
|
|
725
750
|
|
|
726
751
|
#### Parameters
|
|
727
752
|
|
|
728
|
-
- `locator` **([string][
|
|
729
|
-
- `attr` **[string][
|
|
753
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
754
|
+
- `attr` **[string][12]** attribute name.
|
|
730
755
|
|
|
731
|
-
Returns **[Promise][
|
|
756
|
+
Returns **[Promise][18]<[string][12]>** attribute value
|
|
732
757
|
|
|
733
758
|
### grabAttributeFromAll
|
|
734
759
|
|
|
@@ -741,10 +766,10 @@ let hints = await I.grabAttributeFromAll('.tooltip', 'title');
|
|
|
741
766
|
|
|
742
767
|
#### Parameters
|
|
743
768
|
|
|
744
|
-
- `locator` **([string][
|
|
745
|
-
- `attr` **[string][
|
|
769
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
770
|
+
- `attr` **[string][12]** attribute name.
|
|
746
771
|
|
|
747
|
-
Returns **[Promise][
|
|
772
|
+
Returns **[Promise][18]<[Array][19]<[string][12]>>** attribute value
|
|
748
773
|
|
|
749
774
|
### grabBrowserLogs
|
|
750
775
|
|
|
@@ -755,7 +780,7 @@ let logs = await I.grabBrowserLogs();
|
|
|
755
780
|
console.log(JSON.stringify(logs))
|
|
756
781
|
```
|
|
757
782
|
|
|
758
|
-
Returns **[Promise][
|
|
783
|
+
Returns **[Promise][18]<[Array][19]<any>>**
|
|
759
784
|
|
|
760
785
|
### grabCookie
|
|
761
786
|
|
|
@@ -770,9 +795,9 @@ assert(cookie.value, '123456');
|
|
|
770
795
|
|
|
771
796
|
#### Parameters
|
|
772
797
|
|
|
773
|
-
- `name` **[string][
|
|
798
|
+
- `name` **[string][12]?** cookie name.
|
|
774
799
|
|
|
775
|
-
Returns **([Promise][
|
|
800
|
+
Returns **([Promise][18]<[string][12]> | [Promise][18]<[Array][19]<[string][12]>>)** attribute valueReturns cookie in JSON format. If name not passed returns all cookies for this domain.
|
|
776
801
|
|
|
777
802
|
### grabCssPropertyFrom
|
|
778
803
|
|
|
@@ -786,10 +811,10 @@ const value = await I.grabCssPropertyFrom('h3', 'font-weight');
|
|
|
786
811
|
|
|
787
812
|
#### Parameters
|
|
788
813
|
|
|
789
|
-
- `locator` **([string][
|
|
790
|
-
- `cssProperty` **[string][
|
|
814
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
815
|
+
- `cssProperty` **[string][12]** CSS property name.
|
|
791
816
|
|
|
792
|
-
Returns **[Promise][
|
|
817
|
+
Returns **[Promise][18]<[string][12]>** CSS value
|
|
793
818
|
|
|
794
819
|
### grabCssPropertyFromAll
|
|
795
820
|
|
|
@@ -802,10 +827,10 @@ const values = await I.grabCssPropertyFromAll('h3', 'font-weight');
|
|
|
802
827
|
|
|
803
828
|
#### Parameters
|
|
804
829
|
|
|
805
|
-
- `locator` **([string][
|
|
806
|
-
- `cssProperty` **[string][
|
|
830
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
831
|
+
- `cssProperty` **[string][12]** CSS property name.
|
|
807
832
|
|
|
808
|
-
Returns **[Promise][
|
|
833
|
+
Returns **[Promise][18]<[Array][19]<[string][12]>>** CSS value
|
|
809
834
|
|
|
810
835
|
### grabCurrentUrl
|
|
811
836
|
|
|
@@ -817,7 +842,7 @@ let url = await I.grabCurrentUrl();
|
|
|
817
842
|
console.log(`Current URL is [${url}]`);
|
|
818
843
|
```
|
|
819
844
|
|
|
820
|
-
Returns **[Promise][
|
|
845
|
+
Returns **[Promise][18]<[string][12]>** current URL
|
|
821
846
|
|
|
822
847
|
### grabDataFromPerformanceTiming
|
|
823
848
|
|
|
@@ -864,11 +889,11 @@ const width = await I.grabElementBoundingRect('h3', 'width');
|
|
|
864
889
|
|
|
865
890
|
#### Parameters
|
|
866
891
|
|
|
867
|
-
- `locator` **([string][
|
|
892
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
868
893
|
- `prop`
|
|
869
|
-
- `elementSize` **[string][
|
|
894
|
+
- `elementSize` **[string][12]?** x, y, width or height of the given element.
|
|
870
895
|
|
|
871
|
-
Returns **([Promise][
|
|
896
|
+
Returns **([Promise][18]<DOMRect> | [Promise][18]<[number][16]>)** Element bounding rectangle
|
|
872
897
|
|
|
873
898
|
### grabHTMLFrom
|
|
874
899
|
|
|
@@ -883,9 +908,9 @@ let postHTML = await I.grabHTMLFrom('#post');
|
|
|
883
908
|
#### Parameters
|
|
884
909
|
|
|
885
910
|
- `locator`
|
|
886
|
-
- `element` **([string][
|
|
911
|
+
- `element` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
|
|
887
912
|
|
|
888
|
-
Returns **[Promise][
|
|
913
|
+
Returns **[Promise][18]<[string][12]>** HTML code for an element
|
|
889
914
|
|
|
890
915
|
### grabHTMLFromAll
|
|
891
916
|
|
|
@@ -899,9 +924,9 @@ let postHTMLs = await I.grabHTMLFromAll('.post');
|
|
|
899
924
|
#### Parameters
|
|
900
925
|
|
|
901
926
|
- `locator`
|
|
902
|
-
- `element` **([string][
|
|
927
|
+
- `element` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
|
|
903
928
|
|
|
904
|
-
Returns **[Promise][
|
|
929
|
+
Returns **[Promise][18]<[Array][19]<[string][12]>>** HTML code for an element
|
|
905
930
|
|
|
906
931
|
### grabNumberOfOpenTabs
|
|
907
932
|
|
|
@@ -912,7 +937,7 @@ Resumes test execution, so **should be used inside async function with `await`**
|
|
|
912
937
|
let tabs = await I.grabNumberOfOpenTabs();
|
|
913
938
|
```
|
|
914
939
|
|
|
915
|
-
Returns **[Promise][
|
|
940
|
+
Returns **[Promise][18]<[number][16]>** number of open tabs
|
|
916
941
|
|
|
917
942
|
### grabNumberOfVisibleElements
|
|
918
943
|
|
|
@@ -925,9 +950,9 @@ let numOfElements = await I.grabNumberOfVisibleElements('p');
|
|
|
925
950
|
|
|
926
951
|
#### Parameters
|
|
927
952
|
|
|
928
|
-
- `locator` **([string][
|
|
953
|
+
- `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
|
|
929
954
|
|
|
930
|
-
Returns **[Promise][
|
|
955
|
+
Returns **[Promise][18]<[number][16]>** number of visible elements
|
|
931
956
|
|
|
932
957
|
### grabPageScrollPosition
|
|
933
958
|
|
|
@@ -938,7 +963,7 @@ Resumes test execution, so **should be used inside an async function with `await
|
|
|
938
963
|
let { x, y } = await I.grabPageScrollPosition();
|
|
939
964
|
```
|
|
940
965
|
|
|
941
|
-
Returns **[Promise][
|
|
966
|
+
Returns **[Promise][18]<PageScrollPosition>** scroll position
|
|
942
967
|
|
|
943
968
|
### grabPopupText
|
|
944
969
|
|
|
@@ -948,7 +973,7 @@ Grab the text within the popup. If no popup is visible then it will return null
|
|
|
948
973
|
await I.grabPopupText();
|
|
949
974
|
```
|
|
950
975
|
|
|
951
|
-
Returns **[Promise][
|
|
976
|
+
Returns **[Promise][18]<([string][12] | null)>**
|
|
952
977
|
|
|
953
978
|
### grabSource
|
|
954
979
|
|
|
@@ -959,7 +984,7 @@ Resumes test execution, so **should be used inside async function with `await`**
|
|
|
959
984
|
let pageSource = await I.grabSource();
|
|
960
985
|
```
|
|
961
986
|
|
|
962
|
-
Returns **[Promise][
|
|
987
|
+
Returns **[Promise][18]<[string][12]>** source code
|
|
963
988
|
|
|
964
989
|
### grabTextFrom
|
|
965
990
|
|
|
@@ -974,9 +999,9 @@ If multiple elements found returns first element.
|
|
|
974
999
|
|
|
975
1000
|
#### Parameters
|
|
976
1001
|
|
|
977
|
-
- `locator` **([string][
|
|
1002
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
978
1003
|
|
|
979
|
-
Returns **[Promise][
|
|
1004
|
+
Returns **[Promise][18]<[string][12]>** attribute value
|
|
980
1005
|
|
|
981
1006
|
### grabTextFromAll
|
|
982
1007
|
|
|
@@ -989,9 +1014,9 @@ let pins = await I.grabTextFromAll('#pin li');
|
|
|
989
1014
|
|
|
990
1015
|
#### Parameters
|
|
991
1016
|
|
|
992
|
-
- `locator` **([string][
|
|
1017
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
993
1018
|
|
|
994
|
-
Returns **[Promise][
|
|
1019
|
+
Returns **[Promise][18]<[Array][19]<[string][12]>>** attribute value
|
|
995
1020
|
|
|
996
1021
|
### grabTitle
|
|
997
1022
|
|
|
@@ -1002,7 +1027,7 @@ Resumes test execution, so **should be used inside async with `await`** operator
|
|
|
1002
1027
|
let title = await I.grabTitle();
|
|
1003
1028
|
```
|
|
1004
1029
|
|
|
1005
|
-
Returns **[Promise][
|
|
1030
|
+
Returns **[Promise][18]<[string][12]>** title
|
|
1006
1031
|
|
|
1007
1032
|
### grabValueFrom
|
|
1008
1033
|
|
|
@@ -1016,9 +1041,9 @@ let email = await I.grabValueFrom('input[name=email]');
|
|
|
1016
1041
|
|
|
1017
1042
|
#### Parameters
|
|
1018
1043
|
|
|
1019
|
-
- `locator` **([string][
|
|
1044
|
+
- `locator` **([string][12] | [object][10])** field located by label|name|CSS|XPath|strict locator.
|
|
1020
1045
|
|
|
1021
|
-
Returns **[Promise][
|
|
1046
|
+
Returns **[Promise][18]<[string][12]>** attribute value
|
|
1022
1047
|
|
|
1023
1048
|
### grabValueFromAll
|
|
1024
1049
|
|
|
@@ -1031,16 +1056,16 @@ let inputs = await I.grabValueFromAll('//form/input');
|
|
|
1031
1056
|
|
|
1032
1057
|
#### Parameters
|
|
1033
1058
|
|
|
1034
|
-
- `locator` **([string][
|
|
1059
|
+
- `locator` **([string][12] | [object][10])** field located by label|name|CSS|XPath|strict locator.
|
|
1035
1060
|
|
|
1036
|
-
Returns **[Promise][
|
|
1061
|
+
Returns **[Promise][18]<[Array][19]<[string][12]>>** attribute value
|
|
1037
1062
|
|
|
1038
1063
|
### handleDownloads
|
|
1039
1064
|
|
|
1040
1065
|
Handles a file download.Aa file name is required to save the file on disk.
|
|
1041
1066
|
Files are saved to "output" directory.
|
|
1042
1067
|
|
|
1043
|
-
Should be used with [FileSystem helper][
|
|
1068
|
+
Should be used with [FileSystem helper][20] to check that file were downloaded correctly.
|
|
1044
1069
|
|
|
1045
1070
|
```js
|
|
1046
1071
|
I.handleDownloads('downloads/avatar.jpg');
|
|
@@ -1051,7 +1076,7 @@ I.waitForFile('downloads/avatar.jpg', 5);
|
|
|
1051
1076
|
|
|
1052
1077
|
#### Parameters
|
|
1053
1078
|
|
|
1054
|
-
- `fileName` **[string][
|
|
1079
|
+
- `fileName` **[string][12]?** set filename for downloaded file
|
|
1055
1080
|
|
|
1056
1081
|
### haveRequestHeaders
|
|
1057
1082
|
|
|
@@ -1065,22 +1090,43 @@ I.haveRequestHeaders({
|
|
|
1065
1090
|
|
|
1066
1091
|
#### Parameters
|
|
1067
1092
|
|
|
1068
|
-
- `customHeaders` **[object][
|
|
1093
|
+
- `customHeaders` **[object][10]** headers to set
|
|
1094
|
+
|
|
1095
|
+
### makeApiRequest
|
|
1096
|
+
|
|
1097
|
+
Performs [api request][21] using
|
|
1098
|
+
the cookies from the current browser session.
|
|
1099
|
+
|
|
1100
|
+
```js
|
|
1101
|
+
const users = await I.makeApiRequest('GET', '/api/users', { params: { page: 1 }});
|
|
1102
|
+
users[0]
|
|
1103
|
+
I.makeApiRequest('PATCH', )
|
|
1104
|
+
```
|
|
1105
|
+
|
|
1106
|
+
> This is Playwright's built-in alternative to using REST helper's sendGet, sendPost, etc methods.
|
|
1107
|
+
|
|
1108
|
+
#### Parameters
|
|
1109
|
+
|
|
1110
|
+
- `method` **[string][12]** HTTP method
|
|
1111
|
+
- `url` **[string][12]** endpoint
|
|
1112
|
+
- `options` **[object][10]** request options depending on method used
|
|
1113
|
+
|
|
1114
|
+
Returns **[Promise][18]<[object][10]>** response
|
|
1069
1115
|
|
|
1070
1116
|
### mockRoute
|
|
1071
1117
|
|
|
1072
|
-
Mocks network request using [`browserContext.route`][
|
|
1118
|
+
Mocks network request using [`browserContext.route`][22] of Playwright
|
|
1073
1119
|
|
|
1074
1120
|
```js
|
|
1075
1121
|
I.mockRoute(/(.png$)|(.jpg$)/, route => route.abort());
|
|
1076
1122
|
```
|
|
1077
1123
|
|
|
1078
|
-
This method allows intercepting and mocking requests & responses. [Learn more about it][
|
|
1124
|
+
This method allows intercepting and mocking requests & responses. [Learn more about it][23]
|
|
1079
1125
|
|
|
1080
1126
|
#### Parameters
|
|
1081
1127
|
|
|
1082
|
-
- `url` **[string][
|
|
1083
|
-
- `handler` **[function][
|
|
1128
|
+
- `url` **[string][12]?** URL, regex or pattern for to match URL
|
|
1129
|
+
- `handler` **[function][17]?** a function to process request
|
|
1084
1130
|
|
|
1085
1131
|
### moveCursorTo
|
|
1086
1132
|
|
|
@@ -1094,9 +1140,9 @@ I.moveCursorTo('#submit', 5,5);
|
|
|
1094
1140
|
|
|
1095
1141
|
#### Parameters
|
|
1096
1142
|
|
|
1097
|
-
- `locator` **([string][
|
|
1098
|
-
- `offsetX` **[number][
|
|
1099
|
-
- `offsetY` **[number][
|
|
1143
|
+
- `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
|
|
1144
|
+
- `offsetX` **[number][16]** (optional, `0` by default) X-axis offset.
|
|
1145
|
+
- `offsetY` **[number][16]** (optional, `0` by default) Y-axis offset.
|
|
1100
1146
|
|
|
1101
1147
|
### openNewTab
|
|
1102
1148
|
|
|
@@ -1106,7 +1152,7 @@ Open new tab and automatically switched to new tab
|
|
|
1106
1152
|
I.openNewTab();
|
|
1107
1153
|
```
|
|
1108
1154
|
|
|
1109
|
-
You can pass in [page options][
|
|
1155
|
+
You can pass in [page options][24] to emulate device on this page
|
|
1110
1156
|
|
|
1111
1157
|
```js
|
|
1112
1158
|
// enable mobile
|
|
@@ -1121,7 +1167,7 @@ I.openNewTab({ isMobile: true });
|
|
|
1121
1167
|
|
|
1122
1168
|
Presses a key in the browser (on a focused element).
|
|
1123
1169
|
|
|
1124
|
-
_Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][
|
|
1170
|
+
_Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][25].
|
|
1125
1171
|
|
|
1126
1172
|
```js
|
|
1127
1173
|
I.pressKey('Backspace');
|
|
@@ -1180,13 +1226,13 @@ Some of the supported key names are:
|
|
|
1180
1226
|
|
|
1181
1227
|
#### Parameters
|
|
1182
1228
|
|
|
1183
|
-
- `key` **([string][
|
|
1229
|
+
- `key` **([string][12] | [Array][19]<[string][12]>)** key or array of keys to press._Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313][26]).
|
|
1184
1230
|
|
|
1185
1231
|
### pressKeyDown
|
|
1186
1232
|
|
|
1187
1233
|
Presses a key in the browser and leaves it in a down state.
|
|
1188
1234
|
|
|
1189
|
-
To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][
|
|
1235
|
+
To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][27]).
|
|
1190
1236
|
|
|
1191
1237
|
```js
|
|
1192
1238
|
I.pressKeyDown('Control');
|
|
@@ -1196,13 +1242,13 @@ I.pressKeyUp('Control');
|
|
|
1196
1242
|
|
|
1197
1243
|
#### Parameters
|
|
1198
1244
|
|
|
1199
|
-
- `key` **[string][
|
|
1245
|
+
- `key` **[string][12]** name of key to press down.
|
|
1200
1246
|
|
|
1201
1247
|
### pressKeyUp
|
|
1202
1248
|
|
|
1203
1249
|
Releases a key in the browser which was previously set to a down state.
|
|
1204
1250
|
|
|
1205
|
-
To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][
|
|
1251
|
+
To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][27]).
|
|
1206
1252
|
|
|
1207
1253
|
```js
|
|
1208
1254
|
I.pressKeyDown('Control');
|
|
@@ -1212,7 +1258,7 @@ I.pressKeyUp('Control');
|
|
|
1212
1258
|
|
|
1213
1259
|
#### Parameters
|
|
1214
1260
|
|
|
1215
|
-
- `key` **[string][
|
|
1261
|
+
- `key` **[string][12]** name of key to release.
|
|
1216
1262
|
|
|
1217
1263
|
### refreshPage
|
|
1218
1264
|
|
|
@@ -1229,8 +1275,8 @@ First parameter can be set to `maximize`.
|
|
|
1229
1275
|
|
|
1230
1276
|
#### Parameters
|
|
1231
1277
|
|
|
1232
|
-
- `width` **[number][
|
|
1233
|
-
- `height` **[number][
|
|
1278
|
+
- `width` **[number][16]** width in pixels or `maximize`.
|
|
1279
|
+
- `height` **[number][16]** height in pixels.Unlike other drivers Playwright changes the size of a viewport, not the window!
|
|
1234
1280
|
Playwright does not control the window of a browser so it can't adjust its real size.
|
|
1235
1281
|
It also can't maximize a window.Update configuration to change real window size on start:```js
|
|
1236
1282
|
// inside codecept.conf.js
|
|
@@ -1253,8 +1299,8 @@ I.rightClick('Click me', '.context');
|
|
|
1253
1299
|
|
|
1254
1300
|
#### Parameters
|
|
1255
1301
|
|
|
1256
|
-
- `locator` **([string][
|
|
1257
|
-
- `context` **([string][
|
|
1302
|
+
- `locator` **([string][12] | [object][10])** clickable element located by CSS|XPath|strict locator.
|
|
1303
|
+
- `context` **([string][12]? | [object][10])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1258
1304
|
|
|
1259
1305
|
### saveElementScreenshot
|
|
1260
1306
|
|
|
@@ -1267,8 +1313,8 @@ I.saveElementScreenshot(`#submit`,'debug.png');
|
|
|
1267
1313
|
|
|
1268
1314
|
#### Parameters
|
|
1269
1315
|
|
|
1270
|
-
- `locator` **([string][
|
|
1271
|
-
- `fileName` **[string][
|
|
1316
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1317
|
+
- `fileName` **[string][12]** file name to save.
|
|
1272
1318
|
|
|
1273
1319
|
### saveScreenshot
|
|
1274
1320
|
|
|
@@ -1283,8 +1329,8 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
|
|
|
1283
1329
|
|
|
1284
1330
|
#### Parameters
|
|
1285
1331
|
|
|
1286
|
-
- `fileName` **[string][
|
|
1287
|
-
- `fullPage` **[boolean][
|
|
1332
|
+
- `fileName` **[string][12]** file name to save.
|
|
1333
|
+
- `fullPage` **[boolean][28]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
1288
1334
|
|
|
1289
1335
|
### scrollPageToBottom
|
|
1290
1336
|
|
|
@@ -1314,9 +1360,9 @@ I.scrollTo('#submit', 5, 5);
|
|
|
1314
1360
|
|
|
1315
1361
|
#### Parameters
|
|
1316
1362
|
|
|
1317
|
-
- `locator` **([string][
|
|
1318
|
-
- `offsetX` **[number][
|
|
1319
|
-
- `offsetY` **[number][
|
|
1363
|
+
- `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
|
|
1364
|
+
- `offsetX` **[number][16]** (optional, `0` by default) X-axis offset.
|
|
1365
|
+
- `offsetY` **[number][16]** (optional, `0` by default) Y-axis offset.
|
|
1320
1366
|
|
|
1321
1367
|
### see
|
|
1322
1368
|
|
|
@@ -1331,8 +1377,8 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
1331
1377
|
|
|
1332
1378
|
#### Parameters
|
|
1333
1379
|
|
|
1334
|
-
- `text` **[string][
|
|
1335
|
-
- `context` **([string][
|
|
1380
|
+
- `text` **[string][12]** expected on page.
|
|
1381
|
+
- `context` **([string][12]? | [object][10])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1336
1382
|
|
|
1337
1383
|
### seeAttributesOnElements
|
|
1338
1384
|
|
|
@@ -1344,8 +1390,8 @@ I.seeAttributesOnElements('//form', { method: "post"});
|
|
|
1344
1390
|
|
|
1345
1391
|
#### Parameters
|
|
1346
1392
|
|
|
1347
|
-
- `locator` **([string][
|
|
1348
|
-
- `attributes` **[object][
|
|
1393
|
+
- `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
|
|
1394
|
+
- `attributes` **[object][10]** attributes and their values to check.
|
|
1349
1395
|
|
|
1350
1396
|
### seeCheckboxIsChecked
|
|
1351
1397
|
|
|
@@ -1359,7 +1405,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
1359
1405
|
|
|
1360
1406
|
#### Parameters
|
|
1361
1407
|
|
|
1362
|
-
- `field` **([string][
|
|
1408
|
+
- `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
|
|
1363
1409
|
|
|
1364
1410
|
### seeCookie
|
|
1365
1411
|
|
|
@@ -1371,7 +1417,7 @@ I.seeCookie('Auth');
|
|
|
1371
1417
|
|
|
1372
1418
|
#### Parameters
|
|
1373
1419
|
|
|
1374
|
-
- `name` **[string][
|
|
1420
|
+
- `name` **[string][12]** cookie name.
|
|
1375
1421
|
|
|
1376
1422
|
### seeCssPropertiesOnElements
|
|
1377
1423
|
|
|
@@ -1383,8 +1429,8 @@ I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
|
|
|
1383
1429
|
|
|
1384
1430
|
#### Parameters
|
|
1385
1431
|
|
|
1386
|
-
- `locator` **([string][
|
|
1387
|
-
- `cssProperties` **[object][
|
|
1432
|
+
- `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
|
|
1433
|
+
- `cssProperties` **[object][10]** object with CSS properties and their values to check.
|
|
1388
1434
|
|
|
1389
1435
|
### seeCurrentUrlEquals
|
|
1390
1436
|
|
|
@@ -1399,7 +1445,7 @@ I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
|
1399
1445
|
|
|
1400
1446
|
#### Parameters
|
|
1401
1447
|
|
|
1402
|
-
- `url` **[string][
|
|
1448
|
+
- `url` **[string][12]** value to check.
|
|
1403
1449
|
|
|
1404
1450
|
### seeElement
|
|
1405
1451
|
|
|
@@ -1412,7 +1458,7 @@ I.seeElement('#modal');
|
|
|
1412
1458
|
|
|
1413
1459
|
#### Parameters
|
|
1414
1460
|
|
|
1415
|
-
- `locator` **([string][
|
|
1461
|
+
- `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
|
|
1416
1462
|
|
|
1417
1463
|
### seeElementInDOM
|
|
1418
1464
|
|
|
@@ -1425,7 +1471,7 @@ I.seeElementInDOM('#modal');
|
|
|
1425
1471
|
|
|
1426
1472
|
#### Parameters
|
|
1427
1473
|
|
|
1428
|
-
- `locator` **([string][
|
|
1474
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1429
1475
|
|
|
1430
1476
|
### seeInCurrentUrl
|
|
1431
1477
|
|
|
@@ -1437,7 +1483,7 @@ I.seeInCurrentUrl('/register'); // we are on registration page
|
|
|
1437
1483
|
|
|
1438
1484
|
#### Parameters
|
|
1439
1485
|
|
|
1440
|
-
- `url` **[string][
|
|
1486
|
+
- `url` **[string][12]** a fragment to check
|
|
1441
1487
|
|
|
1442
1488
|
### seeInField
|
|
1443
1489
|
|
|
@@ -1453,8 +1499,8 @@ I.seeInField('#searchform input','Search');
|
|
|
1453
1499
|
|
|
1454
1500
|
#### Parameters
|
|
1455
1501
|
|
|
1456
|
-
- `field` **([string][
|
|
1457
|
-
- `value` **[string][
|
|
1502
|
+
- `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
|
|
1503
|
+
- `value` **[string][12]** value to check.
|
|
1458
1504
|
|
|
1459
1505
|
### seeInPopup
|
|
1460
1506
|
|
|
@@ -1467,7 +1513,7 @@ I.seeInPopup('Popup text');
|
|
|
1467
1513
|
|
|
1468
1514
|
#### Parameters
|
|
1469
1515
|
|
|
1470
|
-
- `text` **[string][
|
|
1516
|
+
- `text` **[string][12]** value to check.
|
|
1471
1517
|
|
|
1472
1518
|
### seeInSource
|
|
1473
1519
|
|
|
@@ -1479,7 +1525,7 @@ I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
|
1479
1525
|
|
|
1480
1526
|
#### Parameters
|
|
1481
1527
|
|
|
1482
|
-
- `text` **[string][
|
|
1528
|
+
- `text` **[string][12]** value to check.
|
|
1483
1529
|
|
|
1484
1530
|
### seeInTitle
|
|
1485
1531
|
|
|
@@ -1491,7 +1537,7 @@ I.seeInTitle('Home Page');
|
|
|
1491
1537
|
|
|
1492
1538
|
#### Parameters
|
|
1493
1539
|
|
|
1494
|
-
- `text` **[string][
|
|
1540
|
+
- `text` **[string][12]** text value to check.
|
|
1495
1541
|
|
|
1496
1542
|
### seeNumberOfElements
|
|
1497
1543
|
|
|
@@ -1504,8 +1550,8 @@ I.seeNumberOfElements('#submitBtn', 1);
|
|
|
1504
1550
|
|
|
1505
1551
|
#### Parameters
|
|
1506
1552
|
|
|
1507
|
-
- `locator` **([string][
|
|
1508
|
-
- `num` **[number][
|
|
1553
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1554
|
+
- `num` **[number][16]** number of elements.
|
|
1509
1555
|
|
|
1510
1556
|
### seeNumberOfVisibleElements
|
|
1511
1557
|
|
|
@@ -1518,8 +1564,8 @@ I.seeNumberOfVisibleElements('.buttons', 3);
|
|
|
1518
1564
|
|
|
1519
1565
|
#### Parameters
|
|
1520
1566
|
|
|
1521
|
-
- `locator` **([string][
|
|
1522
|
-
- `num` **[number][
|
|
1567
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1568
|
+
- `num` **[number][16]** number of elements.
|
|
1523
1569
|
|
|
1524
1570
|
### seeTextEquals
|
|
1525
1571
|
|
|
@@ -1531,8 +1577,8 @@ I.seeTextEquals('text', 'h1');
|
|
|
1531
1577
|
|
|
1532
1578
|
#### Parameters
|
|
1533
1579
|
|
|
1534
|
-
- `text` **[string][
|
|
1535
|
-
- `context` **([string][
|
|
1580
|
+
- `text` **[string][12]** element value to check.
|
|
1581
|
+
- `context` **([string][12] | [object][10])?** element located by CSS|XPath|strict locator.
|
|
1536
1582
|
|
|
1537
1583
|
### seeTitleEquals
|
|
1538
1584
|
|
|
@@ -1544,7 +1590,7 @@ I.seeTitleEquals('Test title.');
|
|
|
1544
1590
|
|
|
1545
1591
|
#### Parameters
|
|
1546
1592
|
|
|
1547
|
-
- `text` **[string][
|
|
1593
|
+
- `text` **[string][12]** value to check.
|
|
1548
1594
|
|
|
1549
1595
|
### selectOption
|
|
1550
1596
|
|
|
@@ -1569,8 +1615,8 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
1569
1615
|
|
|
1570
1616
|
#### Parameters
|
|
1571
1617
|
|
|
1572
|
-
- `select` **([string][
|
|
1573
|
-
- `option` **([string][
|
|
1618
|
+
- `select` **([string][12] | [object][10])** field located by label|name|CSS|XPath|strict locator.
|
|
1619
|
+
- `option` **([string][12] | [Array][19]<any>)** visible text or value of option.
|
|
1574
1620
|
|
|
1575
1621
|
### setCookie
|
|
1576
1622
|
|
|
@@ -1590,7 +1636,7 @@ I.setCookie([
|
|
|
1590
1636
|
|
|
1591
1637
|
#### Parameters
|
|
1592
1638
|
|
|
1593
|
-
- `cookie` **(Cookie | [Array][
|
|
1639
|
+
- `cookie` **(Cookie | [Array][19]<Cookie>)** a cookie object or array of cookie objects.
|
|
1594
1640
|
|
|
1595
1641
|
### stopMockingRoute
|
|
1596
1642
|
|
|
@@ -1605,8 +1651,8 @@ If no handler is passed, all mock requests for the rote are disabled.
|
|
|
1605
1651
|
|
|
1606
1652
|
#### Parameters
|
|
1607
1653
|
|
|
1608
|
-
- `url` **[string][
|
|
1609
|
-
- `handler` **[function][
|
|
1654
|
+
- `url` **[string][12]?** URL, regex or pattern for to match URL
|
|
1655
|
+
- `handler` **[function][17]?** a function to process request
|
|
1610
1656
|
|
|
1611
1657
|
### switchTo
|
|
1612
1658
|
|
|
@@ -1619,7 +1665,7 @@ I.switchTo(); // switch back to main page
|
|
|
1619
1665
|
|
|
1620
1666
|
#### Parameters
|
|
1621
1667
|
|
|
1622
|
-
- `locator` **([string][
|
|
1668
|
+
- `locator` **([string][12]? | [object][10])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1623
1669
|
|
|
1624
1670
|
### switchToNextTab
|
|
1625
1671
|
|
|
@@ -1632,7 +1678,7 @@ I.switchToNextTab(2);
|
|
|
1632
1678
|
|
|
1633
1679
|
#### Parameters
|
|
1634
1680
|
|
|
1635
|
-
- `num` **[number][
|
|
1681
|
+
- `num` **[number][16]**
|
|
1636
1682
|
|
|
1637
1683
|
### switchToPreviousTab
|
|
1638
1684
|
|
|
@@ -1645,13 +1691,13 @@ I.switchToPreviousTab(2);
|
|
|
1645
1691
|
|
|
1646
1692
|
#### Parameters
|
|
1647
1693
|
|
|
1648
|
-
- `num` **[number][
|
|
1694
|
+
- `num` **[number][16]**
|
|
1649
1695
|
|
|
1650
1696
|
### type
|
|
1651
1697
|
|
|
1652
1698
|
Types out the given text into an active field.
|
|
1653
1699
|
To slow down typing use a second parameter, to set interval between key presses.
|
|
1654
|
-
_Note:_ Should be used when [`fillField`][
|
|
1700
|
+
_Note:_ Should be used when [`fillField`][25] is not an option.
|
|
1655
1701
|
|
|
1656
1702
|
```js
|
|
1657
1703
|
// passing in a string
|
|
@@ -1667,8 +1713,8 @@ I.type(['T', 'E', 'X', 'T']);
|
|
|
1667
1713
|
#### Parameters
|
|
1668
1714
|
|
|
1669
1715
|
- `keys`
|
|
1670
|
-
- `delay` **[number][
|
|
1671
|
-
- `key` **([string][
|
|
1716
|
+
- `delay` **[number][16]?** (optional) delay in ms between key presses
|
|
1717
|
+
- `key` **([string][12] | [Array][19]<[string][12]>)** or array of keys to type.
|
|
1672
1718
|
|
|
1673
1719
|
### uncheckOption
|
|
1674
1720
|
|
|
@@ -1685,8 +1731,12 @@ I.uncheckOption('agree', '//form');
|
|
|
1685
1731
|
|
|
1686
1732
|
#### Parameters
|
|
1687
1733
|
|
|
1688
|
-
- `field` **([string][
|
|
1689
|
-
- `context` **([string][
|
|
1734
|
+
- `field` **([string][12] | [object][10])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
1735
|
+
- `context` **([string][12]? | [object][10])** (optional, `null` by default) element located by CSS | XPath | strict locator.[Additional options][29] for uncheck available as 3rd argument.Examples:```js
|
|
1736
|
+
// click on element at position
|
|
1737
|
+
I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
|
|
1738
|
+
```> ⚠️ To avoid flakiness, option `force: true` is set by default
|
|
1739
|
+
- `options`
|
|
1690
1740
|
|
|
1691
1741
|
### usePlaywrightTo
|
|
1692
1742
|
|
|
@@ -1695,18 +1745,18 @@ Use Playwright API inside a test.
|
|
|
1695
1745
|
First argument is a description of an action.
|
|
1696
1746
|
Second argument is async function that gets this helper as parameter.
|
|
1697
1747
|
|
|
1698
|
-
{ [`page`][
|
|
1748
|
+
{ [`page`][30], [`browserContext`][31] [`browser`][32] } objects from Playwright API are available.
|
|
1699
1749
|
|
|
1700
1750
|
```js
|
|
1701
|
-
I.usePlaywrightTo('emulate offline mode', async ({
|
|
1702
|
-
await
|
|
1751
|
+
I.usePlaywrightTo('emulate offline mode', async ({ browserContext }) => {
|
|
1752
|
+
await browserContext.setOffline(true);
|
|
1703
1753
|
});
|
|
1704
1754
|
```
|
|
1705
1755
|
|
|
1706
1756
|
#### Parameters
|
|
1707
1757
|
|
|
1708
|
-
- `description` **[string][
|
|
1709
|
-
- `fn` **[function][
|
|
1758
|
+
- `description` **[string][12]** used to show in logs.
|
|
1759
|
+
- `fn` **[function][17]** async function that executed with Playwright helper as argument
|
|
1710
1760
|
|
|
1711
1761
|
### wait
|
|
1712
1762
|
|
|
@@ -1718,7 +1768,7 @@ I.wait(2); // wait 2 secs
|
|
|
1718
1768
|
|
|
1719
1769
|
#### Parameters
|
|
1720
1770
|
|
|
1721
|
-
- `sec` **[number][
|
|
1771
|
+
- `sec` **[number][16]** number of second to wait.
|
|
1722
1772
|
|
|
1723
1773
|
### waitForClickable
|
|
1724
1774
|
|
|
@@ -1732,9 +1782,9 @@ I.waitForClickable('.btn.continue', 5); // wait for 5 secs
|
|
|
1732
1782
|
|
|
1733
1783
|
#### Parameters
|
|
1734
1784
|
|
|
1735
|
-
- `locator` **([string][
|
|
1785
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1736
1786
|
- `waitTimeout`
|
|
1737
|
-
- `sec` **[number][
|
|
1787
|
+
- `sec` **[number][16]?** (optional, `1` by default) time in seconds to wait
|
|
1738
1788
|
|
|
1739
1789
|
### waitForDetached
|
|
1740
1790
|
|
|
@@ -1747,8 +1797,8 @@ I.waitForDetached('#popup');
|
|
|
1747
1797
|
|
|
1748
1798
|
#### Parameters
|
|
1749
1799
|
|
|
1750
|
-
- `locator` **([string][
|
|
1751
|
-
- `sec` **[number][
|
|
1800
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1801
|
+
- `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
|
|
1752
1802
|
|
|
1753
1803
|
### waitForElement
|
|
1754
1804
|
|
|
@@ -1762,8 +1812,8 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
1762
1812
|
|
|
1763
1813
|
#### Parameters
|
|
1764
1814
|
|
|
1765
|
-
- `locator` **([string][
|
|
1766
|
-
- `sec` **[number][
|
|
1815
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1816
|
+
- `sec` **[number][16]?** (optional, `1` by default) time in seconds to wait
|
|
1767
1817
|
|
|
1768
1818
|
### waitForEnabled
|
|
1769
1819
|
|
|
@@ -1772,8 +1822,8 @@ Element can be located by CSS or XPath.
|
|
|
1772
1822
|
|
|
1773
1823
|
#### Parameters
|
|
1774
1824
|
|
|
1775
|
-
- `locator` **([string][
|
|
1776
|
-
- `sec` **[number][
|
|
1825
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1826
|
+
- `sec` **[number][16]** (optional) time in seconds to wait, 1 by default.
|
|
1777
1827
|
|
|
1778
1828
|
### waitForFunction
|
|
1779
1829
|
|
|
@@ -1792,9 +1842,9 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
|
|
|
1792
1842
|
|
|
1793
1843
|
#### Parameters
|
|
1794
1844
|
|
|
1795
|
-
- `fn` **([string][
|
|
1796
|
-
- `argsOrSec` **([Array][
|
|
1797
|
-
- `sec` **[number][
|
|
1845
|
+
- `fn` **([string][12] | [function][17])** to be executed in browser context.
|
|
1846
|
+
- `argsOrSec` **([Array][19]<any> | [number][16])?** (optional, `1` by default) arguments for function or seconds.
|
|
1847
|
+
- `sec` **[number][16]?** (optional, `1` by default) time in seconds to wait
|
|
1798
1848
|
|
|
1799
1849
|
### waitForInvisible
|
|
1800
1850
|
|
|
@@ -1807,14 +1857,14 @@ I.waitForInvisible('#popup');
|
|
|
1807
1857
|
|
|
1808
1858
|
#### Parameters
|
|
1809
1859
|
|
|
1810
|
-
- `locator` **([string][
|
|
1811
|
-
- `sec` **[number][
|
|
1860
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1861
|
+
- `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
|
|
1812
1862
|
|
|
1813
1863
|
### waitForNavigation
|
|
1814
1864
|
|
|
1815
1865
|
Waits for navigation to finish. By default takes configured `waitForNavigation` option.
|
|
1816
1866
|
|
|
1817
|
-
See [Playwright's reference][
|
|
1867
|
+
See [Playwright's reference][33]
|
|
1818
1868
|
|
|
1819
1869
|
#### Parameters
|
|
1820
1870
|
|
|
@@ -1831,8 +1881,8 @@ I.waitForRequest(request => request.url() === 'http://example.com' && request.me
|
|
|
1831
1881
|
|
|
1832
1882
|
#### Parameters
|
|
1833
1883
|
|
|
1834
|
-
- `urlOrPredicate` **([string][
|
|
1835
|
-
- `sec` **[number][
|
|
1884
|
+
- `urlOrPredicate` **([string][12] | [function][17])**
|
|
1885
|
+
- `sec` **[number][16]?** seconds to wait
|
|
1836
1886
|
|
|
1837
1887
|
### waitForResponse
|
|
1838
1888
|
|
|
@@ -1845,8 +1895,8 @@ I.waitForResponse(response => response.url() === 'https://example.com' && respon
|
|
|
1845
1895
|
|
|
1846
1896
|
#### Parameters
|
|
1847
1897
|
|
|
1848
|
-
- `urlOrPredicate` **([string][
|
|
1849
|
-
- `sec` **[number][
|
|
1898
|
+
- `urlOrPredicate` **([string][12] | [function][17])**
|
|
1899
|
+
- `sec` **[number][16]?** number of seconds to wait
|
|
1850
1900
|
|
|
1851
1901
|
### waitForText
|
|
1852
1902
|
|
|
@@ -1861,9 +1911,9 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
1861
1911
|
|
|
1862
1912
|
#### Parameters
|
|
1863
1913
|
|
|
1864
|
-
- `text` **[string][
|
|
1865
|
-
- `sec` **[number][
|
|
1866
|
-
- `context` **([string][
|
|
1914
|
+
- `text` **[string][12]** to wait for.
|
|
1915
|
+
- `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
|
|
1916
|
+
- `context` **([string][12] | [object][10])?** (optional) element located by CSS|XPath|strict locator.
|
|
1867
1917
|
|
|
1868
1918
|
### waitForValue
|
|
1869
1919
|
|
|
@@ -1875,9 +1925,9 @@ I.waitForValue('//input', "GoodValue");
|
|
|
1875
1925
|
|
|
1876
1926
|
#### Parameters
|
|
1877
1927
|
|
|
1878
|
-
- `field` **([string][
|
|
1879
|
-
- `value` **[string][
|
|
1880
|
-
- `sec` **[number][
|
|
1928
|
+
- `field` **([string][12] | [object][10])** input field.
|
|
1929
|
+
- `value` **[string][12]** expected value.
|
|
1930
|
+
- `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
|
|
1881
1931
|
|
|
1882
1932
|
### waitForVisible
|
|
1883
1933
|
|
|
@@ -1890,8 +1940,8 @@ I.waitForVisible('#popup');
|
|
|
1890
1940
|
|
|
1891
1941
|
#### Parameters
|
|
1892
1942
|
|
|
1893
|
-
- `locator` **([string][
|
|
1894
|
-
- `sec` **[number][
|
|
1943
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1944
|
+
- `sec` **[number][16]** (optional, `1` by default) time in seconds to waitThis method accepts [React selectors][34].
|
|
1895
1945
|
|
|
1896
1946
|
### waitInUrl
|
|
1897
1947
|
|
|
@@ -1903,8 +1953,8 @@ I.waitInUrl('/info', 2);
|
|
|
1903
1953
|
|
|
1904
1954
|
#### Parameters
|
|
1905
1955
|
|
|
1906
|
-
- `urlPart` **[string][
|
|
1907
|
-
- `sec` **[number][
|
|
1956
|
+
- `urlPart` **[string][12]** value to check.
|
|
1957
|
+
- `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
|
|
1908
1958
|
|
|
1909
1959
|
### waitNumberOfVisibleElements
|
|
1910
1960
|
|
|
@@ -1916,9 +1966,9 @@ I.waitNumberOfVisibleElements('a', 3);
|
|
|
1916
1966
|
|
|
1917
1967
|
#### Parameters
|
|
1918
1968
|
|
|
1919
|
-
- `locator` **([string][
|
|
1920
|
-
- `num` **[number][
|
|
1921
|
-
- `sec` **[number][
|
|
1969
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1970
|
+
- `num` **[number][16]** number of elements.
|
|
1971
|
+
- `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
|
|
1922
1972
|
|
|
1923
1973
|
### waitToHide
|
|
1924
1974
|
|
|
@@ -1931,8 +1981,8 @@ I.waitToHide('#popup');
|
|
|
1931
1981
|
|
|
1932
1982
|
#### Parameters
|
|
1933
1983
|
|
|
1934
|
-
- `locator` **([string][
|
|
1935
|
-
- `sec` **[number][
|
|
1984
|
+
- `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
|
|
1985
|
+
- `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
|
|
1936
1986
|
|
|
1937
1987
|
### waitUrlEquals
|
|
1938
1988
|
|
|
@@ -1945,59 +1995,73 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
|
|
|
1945
1995
|
|
|
1946
1996
|
#### Parameters
|
|
1947
1997
|
|
|
1948
|
-
- `urlPart` **[string][
|
|
1949
|
-
- `sec` **[number][
|
|
1998
|
+
- `urlPart` **[string][12]** value to check.
|
|
1999
|
+
- `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
|
|
1950
2000
|
|
|
1951
2001
|
[1]: https://github.com/microsoft/playwright
|
|
1952
2002
|
|
|
1953
|
-
[2]: https://playwright.dev/docs/
|
|
2003
|
+
[2]: https://playwright.dev/docs/api/class-browsercontext
|
|
2004
|
+
|
|
2005
|
+
[3]: https://playwright.dev/docs/api/class-page#page-set-default-timeout
|
|
2006
|
+
|
|
2007
|
+
[4]: https://playwright.dev/docs/trace-viewer
|
|
2008
|
+
|
|
2009
|
+
[5]: https://github.com/microsoft/playwright/blob/main/docs/api.md#pagewaitfornavigationoptions
|
|
2010
|
+
|
|
2011
|
+
[6]: https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge
|
|
2012
|
+
|
|
2013
|
+
[7]: https://playwright.dev/docs/next/api/class-browser#browser-new-context
|
|
2014
|
+
|
|
2015
|
+
[8]: https://playwright.dev/docs/api/class-browsertype#browsertypeconnectparams
|
|
2016
|
+
|
|
2017
|
+
[9]: https://github.com/microsoft/playwright/blob/v0.11.0/docs/api.md#working-with-chrome-extensions
|
|
1954
2018
|
|
|
1955
|
-
[
|
|
2019
|
+
[10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
1956
2020
|
|
|
1957
|
-
[
|
|
2021
|
+
[11]: http://jster.net/category/windows-modals-popups
|
|
1958
2022
|
|
|
1959
|
-
[
|
|
2023
|
+
[12]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
1960
2024
|
|
|
1961
|
-
[
|
|
2025
|
+
[13]: https://playwright.dev/docs/api/class-elementhandle#element-handle-check
|
|
1962
2026
|
|
|
1963
|
-
[
|
|
2027
|
+
[14]: https://playwright.dev/docs/api/class-page#page-click
|
|
1964
2028
|
|
|
1965
|
-
[
|
|
2029
|
+
[15]: https://playwright.dev/docs/api/class-page#page-drag-and-drop
|
|
1966
2030
|
|
|
1967
|
-
[
|
|
2031
|
+
[16]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
1968
2032
|
|
|
1969
|
-
[
|
|
2033
|
+
[17]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
|
|
1970
2034
|
|
|
1971
|
-
[
|
|
2035
|
+
[18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
|
1972
2036
|
|
|
1973
|
-
[
|
|
2037
|
+
[19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
1974
2038
|
|
|
1975
|
-
[
|
|
2039
|
+
[20]: https://codecept.io/helpers/FileSystem
|
|
1976
2040
|
|
|
1977
|
-
[
|
|
2041
|
+
[21]: https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get
|
|
1978
2042
|
|
|
1979
|
-
[
|
|
2043
|
+
[22]: https://playwright.dev/docs/api/class-browsercontext#browser-context-route
|
|
1980
2044
|
|
|
1981
|
-
[
|
|
2045
|
+
[23]: https://playwright.dev/docs/network#handle-requests
|
|
1982
2046
|
|
|
1983
|
-
[
|
|
2047
|
+
[24]: https://github.com/microsoft/playwright/blob/main/docs/api.md#browsernewpageoptions
|
|
1984
2048
|
|
|
1985
|
-
[
|
|
2049
|
+
[25]: #fillfield
|
|
1986
2050
|
|
|
1987
|
-
[
|
|
2051
|
+
[26]: https://github.com/GoogleChrome/puppeteer/issues/1313
|
|
1988
2052
|
|
|
1989
|
-
[
|
|
2053
|
+
[27]: #click
|
|
1990
2054
|
|
|
1991
|
-
[
|
|
2055
|
+
[28]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
1992
2056
|
|
|
1993
|
-
[
|
|
2057
|
+
[29]: https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck
|
|
1994
2058
|
|
|
1995
|
-
[
|
|
2059
|
+
[30]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-page.md
|
|
1996
2060
|
|
|
1997
|
-
[
|
|
2061
|
+
[31]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md
|
|
1998
2062
|
|
|
1999
|
-
[
|
|
2063
|
+
[32]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browser.md
|
|
2000
2064
|
|
|
2001
|
-
[
|
|
2065
|
+
[33]: https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions
|
|
2002
2066
|
|
|
2003
|
-
[
|
|
2067
|
+
[34]: https://codecept.io/react
|