codeceptjs 3.3.3 → 3.3.5-beta.2
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 +38 -0
- package/docs/api.md +4 -0
- package/docs/basics.md +2 -0
- package/docs/bdd.md +12 -0
- package/docs/build/JSONResponse.js +44 -3
- package/docs/build/Playwright.js +63 -40
- package/docs/build/Puppeteer.js +54 -43
- package/docs/build/REST.js +23 -9
- package/docs/build/WebDriver.js +39 -30
- package/docs/community-helpers.md +1 -0
- package/docs/configuration.md +21 -18
- package/docs/helpers/Appium.md +0 -723
- package/docs/helpers/JSONResponse.md +24 -0
- package/docs/helpers/Playwright.md +276 -264
- package/docs/helpers/Puppeteer.md +230 -222
- package/docs/helpers/REST.md +21 -6
- package/docs/helpers/WebDriver.md +265 -259
- package/docs/plugins.md +41 -1
- package/docs/reports.md +11 -0
- package/docs/secrets.md +30 -0
- package/docs/wiki/.git/FETCH_HEAD +1 -0
- package/docs/wiki/.git/HEAD +1 -0
- package/docs/wiki/.git/ORIG_HEAD +1 -0
- package/docs/wiki/.git/config +11 -0
- package/docs/wiki/.git/description +1 -0
- package/docs/wiki/.git/hooks/applypatch-msg.sample +15 -0
- package/docs/wiki/.git/hooks/commit-msg.sample +24 -0
- package/docs/wiki/.git/hooks/fsmonitor-watchman.sample +173 -0
- package/docs/wiki/.git/hooks/post-update.sample +8 -0
- package/docs/wiki/.git/hooks/pre-applypatch.sample +14 -0
- package/docs/wiki/.git/hooks/pre-commit.sample +49 -0
- package/docs/wiki/.git/hooks/pre-merge-commit.sample +13 -0
- package/docs/wiki/.git/hooks/pre-push.sample +53 -0
- package/docs/wiki/.git/hooks/pre-rebase.sample +169 -0
- package/docs/wiki/.git/hooks/pre-receive.sample +24 -0
- package/docs/wiki/.git/hooks/prepare-commit-msg.sample +42 -0
- package/docs/wiki/.git/hooks/push-to-checkout.sample +78 -0
- package/docs/wiki/.git/hooks/update.sample +128 -0
- package/docs/wiki/.git/index +0 -0
- package/docs/wiki/.git/info/exclude +6 -0
- package/docs/wiki/.git/logs/HEAD +1 -0
- package/docs/wiki/.git/logs/refs/heads/master +1 -0
- package/docs/wiki/.git/logs/refs/remotes/origin/HEAD +1 -0
- 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 +2 -0
- package/docs/wiki/.git/refs/heads/master +1 -0
- package/docs/wiki/.git/refs/remotes/origin/HEAD +1 -0
- package/docs/wiki/Community-Helpers-&-Plugins.md +7 -3
- package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +29 -0
- package/docs/wiki/Examples.md +39 -48
- package/docs/wiki/Release-Process.md +8 -8
- package/docs/wiki/Tests.md +62 -60
- package/docs/wiki/Upgrading-to-CodeceptJS-3.md +2 -2
- package/lib/command/generate.js +3 -0
- package/lib/command/init.js +88 -41
- package/lib/command/interactive.js +1 -1
- package/lib/config.js +9 -0
- package/lib/helper/JSONResponse.js +44 -3
- package/lib/helper/Playwright.js +63 -40
- package/lib/helper/Puppeteer.js +54 -43
- package/lib/helper/REST.js +23 -9
- package/lib/helper/WebDriver.js +39 -30
- package/lib/interfaces/gherkin.js +1 -1
- package/lib/plugin/customLocator.js +50 -3
- package/lib/plugin/retryFailedStep.js +1 -1
- package/lib/plugin/retryTo.js +1 -8
- package/lib/secret.js +31 -1
- package/lib/step.js +22 -10
- package/lib/utils.js +1 -6
- package/package.json +4 -4
- package/typings/index.d.ts +158 -0
- package/typings/types.d.ts +367 -96
|
@@ -27,29 +27,37 @@ Using `puppeteer-core` package, will prevent the download of browser binaries an
|
|
|
27
27
|
|
|
28
28
|
> Experimental Firefox support [can be activated][2].
|
|
29
29
|
|
|
30
|
+
|
|
31
|
+
|
|
30
32
|
## Configuration
|
|
31
33
|
|
|
32
|
-
This helper should be configured in codecept.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- `
|
|
39
|
-
- `
|
|
40
|
-
- `
|
|
41
|
-
- `
|
|
42
|
-
- `
|
|
43
|
-
- `
|
|
44
|
-
- `
|
|
45
|
-
- `
|
|
46
|
-
- `
|
|
47
|
-
- `
|
|
48
|
-
- `
|
|
49
|
-
- `
|
|
50
|
-
- `
|
|
51
|
-
- `
|
|
52
|
-
- `
|
|
34
|
+
This helper should be configured in codecept.conf.js
|
|
35
|
+
|
|
36
|
+
Type: [object][4]
|
|
37
|
+
|
|
38
|
+
### Properties
|
|
39
|
+
|
|
40
|
+
- `url` **[string][6]** base url of website to be tested
|
|
41
|
+
- `basicAuth` **[object][4]?** (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
|
|
42
|
+
- `show` **[boolean][17]?** show Google Chrome window for debug.
|
|
43
|
+
- `restart` **[boolean][17]?** restart browser between tests.
|
|
44
|
+
- `disableScreenshots` **[boolean][17]?** don't save screenshot on failure.
|
|
45
|
+
- `fullPageScreenshots` **[boolean][17]?** make full page screenshots on failure.
|
|
46
|
+
- `uniqueScreenshotNames` **[boolean][17]?** option to prevent screenshot override if you have scenarios with the same name in different suites.
|
|
47
|
+
- `keepBrowserState` **[boolean][17]?** keep browser state between tests when `restart` is set to false.
|
|
48
|
+
- `keepCookies` **[boolean][17]?** keep cookies between tests when `restart` is set to false.
|
|
49
|
+
- `waitForAction` **[number][8]?** how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
|
|
50
|
+
- `waitForNavigation` **[string][6]?** when to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle0`, `networkidle2`. See [Puppeteer API][20]. Array values are accepted as well.
|
|
51
|
+
- `pressKeyDelay` **[number][8]?** delay between key presses in ms. Used when calling Puppeteers page.type(...) in fillField/appendField
|
|
52
|
+
- `getPageTimeout` **[number][8]?** config option to set maximum navigation time in milliseconds. If the timeout is set to 0, then timeout will be disabled.
|
|
53
|
+
- `waitForTimeout` **[number][8]?** default wait* timeout in ms.
|
|
54
|
+
- `windowSize` **[string][6]?** default window size. Set a dimension in format WIDTHxHEIGHT like `640x480`.
|
|
55
|
+
- `userAgent` **[string][6]?** user-agent string.
|
|
56
|
+
- `manualStart` **[boolean][17]?** do not start browser before a test, start it manually inside a helper with `this.helpers["Puppeteer"]._startBrowser()`.
|
|
57
|
+
- `browser` **[string][6]?** can be changed to `firefox` when using [puppeteer-firefox][2].
|
|
58
|
+
- `chrome` **[object][4]?** pass additional [Puppeteer run options][22].
|
|
59
|
+
|
|
60
|
+
|
|
53
61
|
|
|
54
62
|
#### Example #1: Wait for 0 network connections.
|
|
55
63
|
|
|
@@ -94,7 +102,7 @@ This helper should be configured in codecept.json or codecept.conf.js
|
|
|
94
102
|
}
|
|
95
103
|
```
|
|
96
104
|
|
|
97
|
-
#### Example #4: Connect to remote browser by specifying [websocket endpoint][
|
|
105
|
+
#### Example #4: Connect to remote browser by specifying [websocket endpoint][3]
|
|
98
106
|
|
|
99
107
|
```js
|
|
100
108
|
{
|
|
@@ -234,13 +242,13 @@ Set current page
|
|
|
234
242
|
|
|
235
243
|
#### Parameters
|
|
236
244
|
|
|
237
|
-
- `page` **[object][
|
|
245
|
+
- `page` **[object][4]** page to set
|
|
238
246
|
|
|
239
247
|
### acceptPopup
|
|
240
248
|
|
|
241
249
|
Accepts the active JavaScript native popup window, as created by window.alert|window.confirm|window.prompt.
|
|
242
250
|
Don't confuse popups with modal windows, as created by [various
|
|
243
|
-
libraries][
|
|
251
|
+
libraries][5].
|
|
244
252
|
|
|
245
253
|
### amAcceptingPopups
|
|
246
254
|
|
|
@@ -277,7 +285,7 @@ I.amOnPage('/login'); // opens a login page
|
|
|
277
285
|
|
|
278
286
|
#### Parameters
|
|
279
287
|
|
|
280
|
-
- `url` **[string][
|
|
288
|
+
- `url` **[string][6]** url path or global url.
|
|
281
289
|
|
|
282
290
|
Returns **void** automatically synchronized promise with recorder #!
|
|
283
291
|
|
|
@@ -292,8 +300,8 @@ I.appendField('#myTextField', 'appended');
|
|
|
292
300
|
|
|
293
301
|
#### Parameters
|
|
294
302
|
|
|
295
|
-
- `field` **([string][
|
|
296
|
-
- `value` **[string][
|
|
303
|
+
- `field` **([string][6] | [object][4])** located by label|name|CSS|XPath|strict locator
|
|
304
|
+
- `value` **[string][6]** text value to append.
|
|
297
305
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
298
306
|
|
|
299
307
|
|
|
@@ -313,9 +321,9 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
|
313
321
|
|
|
314
322
|
#### Parameters
|
|
315
323
|
|
|
316
|
-
- `locator` **([string][
|
|
317
|
-
- `pathToFile` **[string][
|
|
318
|
-
[!] returns a _promise_ which is synchronized internally by recorder> ⚠ There is an [issue with file upload in Puppeteer 2.1.0 & 2.1.1][
|
|
324
|
+
- `locator` **([string][6] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
325
|
+
- `pathToFile` **[string][6]** local file path relative to codecept.json config file.
|
|
326
|
+
[!] returns a _promise_ which is synchronized internally by recorder> ⚠ There is an [issue with file upload in Puppeteer 2.1.0 & 2.1.1][7], downgrade to 2.0.0 if you face it.
|
|
319
327
|
|
|
320
328
|
### cancelPopup
|
|
321
329
|
|
|
@@ -336,8 +344,8 @@ I.checkOption('agree', '//form');
|
|
|
336
344
|
|
|
337
345
|
#### Parameters
|
|
338
346
|
|
|
339
|
-
- `field` **([string][
|
|
340
|
-
- `context` **([string][
|
|
347
|
+
- `field` **([string][6] | [object][4])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
348
|
+
- `context` **([string][6]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
341
349
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
342
350
|
|
|
343
351
|
### clearCookie
|
|
@@ -353,7 +361,7 @@ I.clearCookie('test');
|
|
|
353
361
|
#### Parameters
|
|
354
362
|
|
|
355
363
|
- `name`
|
|
356
|
-
- `cookie` **[string][
|
|
364
|
+
- `cookie` **[string][6]?** (optional, `null` by default) cookie name
|
|
357
365
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
358
366
|
|
|
359
367
|
### clearField
|
|
@@ -369,7 +377,7 @@ I.clearField('#email');
|
|
|
369
377
|
#### Parameters
|
|
370
378
|
|
|
371
379
|
- `field`
|
|
372
|
-
- `editable` **([string][
|
|
380
|
+
- `editable` **([string][6] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
373
381
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
374
382
|
|
|
375
383
|
### click
|
|
@@ -398,8 +406,8 @@ I.click({css: 'nav a.login'});
|
|
|
398
406
|
|
|
399
407
|
#### Parameters
|
|
400
408
|
|
|
401
|
-
- `locator` **([string][
|
|
402
|
-
- `context` **([string][
|
|
409
|
+
- `locator` **([string][6] | [object][4])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
410
|
+
- `context` **([string][6]? | [object][4] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
403
411
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
404
412
|
|
|
405
413
|
|
|
@@ -416,8 +424,8 @@ I.clickLink('Logout', '#nav');
|
|
|
416
424
|
|
|
417
425
|
#### Parameters
|
|
418
426
|
|
|
419
|
-
- `locator` **([string][
|
|
420
|
-
- `context` **([string][
|
|
427
|
+
- `locator` **([string][6] | [object][4])** clickable link or button located by text, or any element located by CSS|XPath|strict locator
|
|
428
|
+
- `context` **([string][6]? | [object][4])** (optional, `null` by default) element to search in CSS|XPath|Strict locator
|
|
421
429
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
422
430
|
|
|
423
431
|
|
|
@@ -452,8 +460,8 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
452
460
|
|
|
453
461
|
#### Parameters
|
|
454
462
|
|
|
455
|
-
- `text` **[string][
|
|
456
|
-
- `context` **([string][
|
|
463
|
+
- `text` **[string][6]** which is not present.
|
|
464
|
+
- `context` **([string][6] | [object][4])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
457
465
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
458
466
|
|
|
459
467
|
|
|
@@ -472,7 +480,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
472
480
|
|
|
473
481
|
#### Parameters
|
|
474
482
|
|
|
475
|
-
- `field` **([string][
|
|
483
|
+
- `field` **([string][6] | [object][4])** located by label|name|CSS|XPath|strict locator.
|
|
476
484
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
477
485
|
|
|
478
486
|
### dontSeeCookie
|
|
@@ -485,7 +493,7 @@ I.dontSeeCookie('auth'); // no auth cookie
|
|
|
485
493
|
|
|
486
494
|
#### Parameters
|
|
487
495
|
|
|
488
|
-
- `name` **[string][
|
|
496
|
+
- `name` **[string][6]** cookie name.
|
|
489
497
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
490
498
|
|
|
491
499
|
### dontSeeCurrentUrlEquals
|
|
@@ -500,7 +508,7 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
|
|
|
500
508
|
|
|
501
509
|
#### Parameters
|
|
502
510
|
|
|
503
|
-
- `url` **[string][
|
|
511
|
+
- `url` **[string][6]** value to check.
|
|
504
512
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
505
513
|
|
|
506
514
|
### dontSeeElement
|
|
@@ -513,7 +521,7 @@ I.dontSeeElement('.modal'); // modal is not shown
|
|
|
513
521
|
|
|
514
522
|
#### Parameters
|
|
515
523
|
|
|
516
|
-
- `locator` **([string][
|
|
524
|
+
- `locator` **([string][6] | [object][4])** located by CSS|XPath|Strict locator.
|
|
517
525
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
518
526
|
|
|
519
527
|
|
|
@@ -531,7 +539,7 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
|
|
|
531
539
|
|
|
532
540
|
#### Parameters
|
|
533
541
|
|
|
534
|
-
- `locator` **([string][
|
|
542
|
+
- `locator` **([string][6] | [object][4])** located by CSS|XPath|Strict locator.
|
|
535
543
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
536
544
|
|
|
537
545
|
### dontSeeInCurrentUrl
|
|
@@ -540,7 +548,7 @@ Checks that current url does not contain a provided fragment.
|
|
|
540
548
|
|
|
541
549
|
#### Parameters
|
|
542
550
|
|
|
543
|
-
- `url` **[string][
|
|
551
|
+
- `url` **[string][6]** value to check.
|
|
544
552
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
545
553
|
|
|
546
554
|
### dontSeeInField
|
|
@@ -555,8 +563,8 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
|
555
563
|
|
|
556
564
|
#### Parameters
|
|
557
565
|
|
|
558
|
-
- `field` **([string][
|
|
559
|
-
- `value` **[string][
|
|
566
|
+
- `field` **([string][6] | [object][4])** located by label|name|CSS|XPath|strict locator.
|
|
567
|
+
- `value` **[string][6]** value to check.
|
|
560
568
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
561
569
|
|
|
562
570
|
### dontSeeInSource
|
|
@@ -570,7 +578,7 @@ I.dontSeeInSource('<!--'); // no comments in source
|
|
|
570
578
|
#### Parameters
|
|
571
579
|
|
|
572
580
|
- `text`
|
|
573
|
-
- `value` **[string][
|
|
581
|
+
- `value` **[string][6]** to check.
|
|
574
582
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
575
583
|
|
|
576
584
|
### dontSeeInTitle
|
|
@@ -583,7 +591,7 @@ I.dontSeeInTitle('Error');
|
|
|
583
591
|
|
|
584
592
|
#### Parameters
|
|
585
593
|
|
|
586
|
-
- `text` **[string][
|
|
594
|
+
- `text` **[string][6]** value to check.
|
|
587
595
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
588
596
|
|
|
589
597
|
### doubleClick
|
|
@@ -600,8 +608,8 @@ I.doubleClick('.btn.edit');
|
|
|
600
608
|
|
|
601
609
|
#### Parameters
|
|
602
610
|
|
|
603
|
-
- `locator` **([string][
|
|
604
|
-
- `context` **([string][
|
|
611
|
+
- `locator` **([string][6] | [object][4])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
612
|
+
- `context` **([string][6]? | [object][4])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
605
613
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
606
614
|
|
|
607
615
|
|
|
@@ -629,8 +637,8 @@ I.dragAndDrop('#dragHandle', '#container');
|
|
|
629
637
|
|
|
630
638
|
#### Parameters
|
|
631
639
|
|
|
632
|
-
- `srcElement` **([string][
|
|
633
|
-
- `destElement` **([string][
|
|
640
|
+
- `srcElement` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
|
|
641
|
+
- `destElement` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
|
|
634
642
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
635
643
|
|
|
636
644
|
### dragSlider
|
|
@@ -645,8 +653,8 @@ I.dragSlider('#slider', -70);
|
|
|
645
653
|
|
|
646
654
|
#### Parameters
|
|
647
655
|
|
|
648
|
-
- `locator` **([string][
|
|
649
|
-
- `offsetX` **[number][
|
|
656
|
+
- `locator` **([string][6] | [object][4])** located by label|name|CSS|XPath|strict locator.
|
|
657
|
+
- `offsetX` **[number][8]** position to drag.
|
|
650
658
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
651
659
|
|
|
652
660
|
|
|
@@ -659,7 +667,7 @@ This action supports [React locators](https://codecept.io/react#locators)
|
|
|
659
667
|
Executes async script on page.
|
|
660
668
|
Provided function should execute a passed callback (as first argument) to signal it is finished.
|
|
661
669
|
|
|
662
|
-
Example: In Vue.js to make components completely rendered we are waiting for [nextTick][
|
|
670
|
+
Example: In Vue.js to make components completely rendered we are waiting for [nextTick][9].
|
|
663
671
|
|
|
664
672
|
```js
|
|
665
673
|
I.executeAsyncScript(function(done) {
|
|
@@ -681,7 +689,7 @@ let val = await I.executeAsyncScript(function(url, done) {
|
|
|
681
689
|
|
|
682
690
|
- `args` **...any** to be passed to function.
|
|
683
691
|
[!] returns a _promise_ which is synchronized internally by recorderAsynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
|
|
684
|
-
- `fn` **([string][
|
|
692
|
+
- `fn` **([string][6] | [function][10])** function to be executed in browser context.
|
|
685
693
|
|
|
686
694
|
### executeScript
|
|
687
695
|
|
|
@@ -713,7 +721,7 @@ let date = await I.executeScript(function(el) {
|
|
|
713
721
|
|
|
714
722
|
- `args` **...any** to be passed to function.
|
|
715
723
|
[!] returns a _promise_ which is synchronized internally by recorderIf a function returns a Promise It will wait for it resolution.
|
|
716
|
-
- `fn` **([string][
|
|
724
|
+
- `fn` **([string][6] | [function][10])** function to be executed in browser context.
|
|
717
725
|
|
|
718
726
|
### fillField
|
|
719
727
|
|
|
@@ -733,8 +741,8 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
|
733
741
|
|
|
734
742
|
#### Parameters
|
|
735
743
|
|
|
736
|
-
- `field` **([string][
|
|
737
|
-
- `value` **([string][
|
|
744
|
+
- `field` **([string][6] | [object][4])** located by label|name|CSS|XPath|strict locator.
|
|
745
|
+
- `value` **([string][6] | [object][4])** text value to fill.
|
|
738
746
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
739
747
|
|
|
740
748
|
|
|
@@ -771,8 +779,8 @@ I.forceClick({css: 'nav a.login'});
|
|
|
771
779
|
|
|
772
780
|
#### Parameters
|
|
773
781
|
|
|
774
|
-
- `locator` **([string][
|
|
775
|
-
- `context` **([string][
|
|
782
|
+
- `locator` **([string][6] | [object][4])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
783
|
+
- `context` **([string][6]? | [object][4])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
776
784
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
777
785
|
|
|
778
786
|
|
|
@@ -791,10 +799,10 @@ let hint = await I.grabAttributeFrom('#tooltip', 'title');
|
|
|
791
799
|
|
|
792
800
|
#### Parameters
|
|
793
801
|
|
|
794
|
-
- `locator` **([string][
|
|
795
|
-
- `attr` **[string][
|
|
802
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
803
|
+
- `attr` **[string][6]** attribute name.
|
|
796
804
|
|
|
797
|
-
Returns **[Promise][
|
|
805
|
+
Returns **[Promise][11]<[string][6]>** attribute value
|
|
798
806
|
|
|
799
807
|
|
|
800
808
|
This action supports [React locators](https://codecept.io/react#locators)
|
|
@@ -811,10 +819,10 @@ let hints = await I.grabAttributeFromAll('.tooltip', 'title');
|
|
|
811
819
|
|
|
812
820
|
#### Parameters
|
|
813
821
|
|
|
814
|
-
- `locator` **([string][
|
|
815
|
-
- `attr` **[string][
|
|
822
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
823
|
+
- `attr` **[string][6]** attribute name.
|
|
816
824
|
|
|
817
|
-
Returns **[Promise][
|
|
825
|
+
Returns **[Promise][11]<[Array][12]<[string][6]>>** attribute value
|
|
818
826
|
|
|
819
827
|
|
|
820
828
|
This action supports [React locators](https://codecept.io/react#locators)
|
|
@@ -829,7 +837,7 @@ let logs = await I.grabBrowserLogs();
|
|
|
829
837
|
console.log(JSON.stringify(logs))
|
|
830
838
|
```
|
|
831
839
|
|
|
832
|
-
Returns **[Promise][
|
|
840
|
+
Returns **[Promise][11]<[Array][12]<any>>**
|
|
833
841
|
|
|
834
842
|
### grabCookie
|
|
835
843
|
|
|
@@ -844,9 +852,9 @@ assert(cookie.value, '123456');
|
|
|
844
852
|
|
|
845
853
|
#### Parameters
|
|
846
854
|
|
|
847
|
-
- `name` **[string][
|
|
855
|
+
- `name` **[string][6]?** cookie name.
|
|
848
856
|
|
|
849
|
-
Returns **([Promise][
|
|
857
|
+
Returns **([Promise][11]<[string][6]> | [Promise][11]<[Array][12]<[string][6]>>)** attribute valueReturns cookie in JSON format. If name not passed returns all cookies for this domain.
|
|
850
858
|
|
|
851
859
|
### grabCssPropertyFrom
|
|
852
860
|
|
|
@@ -860,10 +868,10 @@ const value = await I.grabCssPropertyFrom('h3', 'font-weight');
|
|
|
860
868
|
|
|
861
869
|
#### Parameters
|
|
862
870
|
|
|
863
|
-
- `locator` **([string][
|
|
864
|
-
- `cssProperty` **[string][
|
|
871
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
872
|
+
- `cssProperty` **[string][6]** CSS property name.
|
|
865
873
|
|
|
866
|
-
Returns **[Promise][
|
|
874
|
+
Returns **[Promise][11]<[string][6]>** CSS value
|
|
867
875
|
|
|
868
876
|
|
|
869
877
|
This action supports [React locators](https://codecept.io/react#locators)
|
|
@@ -880,10 +888,10 @@ const values = await I.grabCssPropertyFromAll('h3', 'font-weight');
|
|
|
880
888
|
|
|
881
889
|
#### Parameters
|
|
882
890
|
|
|
883
|
-
- `locator` **([string][
|
|
884
|
-
- `cssProperty` **[string][
|
|
891
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
892
|
+
- `cssProperty` **[string][6]** CSS property name.
|
|
885
893
|
|
|
886
|
-
Returns **[Promise][
|
|
894
|
+
Returns **[Promise][11]<[Array][12]<[string][6]>>** CSS value
|
|
887
895
|
|
|
888
896
|
|
|
889
897
|
This action supports [React locators](https://codecept.io/react#locators)
|
|
@@ -899,7 +907,7 @@ let url = await I.grabCurrentUrl();
|
|
|
899
907
|
console.log(`Current URL is [${url}]`);
|
|
900
908
|
```
|
|
901
909
|
|
|
902
|
-
Returns **[Promise][
|
|
910
|
+
Returns **[Promise][11]<[string][6]>** current URL
|
|
903
911
|
|
|
904
912
|
### grabDataFromPerformanceTiming
|
|
905
913
|
|
|
@@ -924,7 +932,7 @@ let data = await I.grabDataFromPerformanceTiming();
|
|
|
924
932
|
}
|
|
925
933
|
```
|
|
926
934
|
|
|
927
|
-
Returns **[Promise][
|
|
935
|
+
Returns **[Promise][11]<any>** automatically synchronized promise through #recorder
|
|
928
936
|
|
|
929
937
|
### grabElementBoundingRect
|
|
930
938
|
|
|
@@ -948,11 +956,11 @@ const width = await I.grabElementBoundingRect('h3', 'width');
|
|
|
948
956
|
|
|
949
957
|
#### Parameters
|
|
950
958
|
|
|
951
|
-
- `locator` **([string][
|
|
959
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
952
960
|
- `prop`
|
|
953
|
-
- `elementSize` **[string][
|
|
961
|
+
- `elementSize` **[string][6]?** x, y, width or height of the given element.
|
|
954
962
|
|
|
955
|
-
Returns **([Promise][
|
|
963
|
+
Returns **([Promise][11]<DOMRect> | [Promise][11]<[number][8]>)** Element bounding rectangle
|
|
956
964
|
|
|
957
965
|
### grabHTMLFrom
|
|
958
966
|
|
|
@@ -967,9 +975,9 @@ let postHTML = await I.grabHTMLFrom('#post');
|
|
|
967
975
|
#### Parameters
|
|
968
976
|
|
|
969
977
|
- `locator`
|
|
970
|
-
- `element` **([string][
|
|
978
|
+
- `element` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
|
|
971
979
|
|
|
972
|
-
Returns **[Promise][
|
|
980
|
+
Returns **[Promise][11]<[string][6]>** HTML code for an element
|
|
973
981
|
|
|
974
982
|
### grabHTMLFromAll
|
|
975
983
|
|
|
@@ -983,9 +991,9 @@ let postHTMLs = await I.grabHTMLFromAll('.post');
|
|
|
983
991
|
#### Parameters
|
|
984
992
|
|
|
985
993
|
- `locator`
|
|
986
|
-
- `element` **([string][
|
|
994
|
+
- `element` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
|
|
987
995
|
|
|
988
|
-
Returns **[Promise][
|
|
996
|
+
Returns **[Promise][11]<[Array][12]<[string][6]>>** HTML code for an element
|
|
989
997
|
|
|
990
998
|
### grabNumberOfOpenTabs
|
|
991
999
|
|
|
@@ -996,7 +1004,7 @@ Resumes test execution, so **should be used inside async function with `await`**
|
|
|
996
1004
|
let tabs = await I.grabNumberOfOpenTabs();
|
|
997
1005
|
```
|
|
998
1006
|
|
|
999
|
-
Returns **[Promise][
|
|
1007
|
+
Returns **[Promise][11]<[number][8]>** number of open tabs
|
|
1000
1008
|
|
|
1001
1009
|
### grabNumberOfVisibleElements
|
|
1002
1010
|
|
|
@@ -1009,9 +1017,9 @@ let numOfElements = await I.grabNumberOfVisibleElements('p');
|
|
|
1009
1017
|
|
|
1010
1018
|
#### Parameters
|
|
1011
1019
|
|
|
1012
|
-
- `locator` **([string][
|
|
1020
|
+
- `locator` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
|
|
1013
1021
|
|
|
1014
|
-
Returns **[Promise][
|
|
1022
|
+
Returns **[Promise][11]<[number][8]>** number of visible elements
|
|
1015
1023
|
|
|
1016
1024
|
|
|
1017
1025
|
|
|
@@ -1027,7 +1035,7 @@ Resumes test execution, so **should be used inside an async function with `await
|
|
|
1027
1035
|
let { x, y } = await I.grabPageScrollPosition();
|
|
1028
1036
|
```
|
|
1029
1037
|
|
|
1030
|
-
Returns **[Promise][
|
|
1038
|
+
Returns **[Promise][11]<PageScrollPosition>** scroll position
|
|
1031
1039
|
|
|
1032
1040
|
### grabPopupText
|
|
1033
1041
|
|
|
@@ -1037,7 +1045,7 @@ Grab the text within the popup. If no popup is visible then it will return null
|
|
|
1037
1045
|
await I.grabPopupText();
|
|
1038
1046
|
```
|
|
1039
1047
|
|
|
1040
|
-
Returns **[Promise][
|
|
1048
|
+
Returns **[Promise][11]<([string][6] | null)>**
|
|
1041
1049
|
|
|
1042
1050
|
### grabSource
|
|
1043
1051
|
|
|
@@ -1048,7 +1056,7 @@ Resumes test execution, so **should be used inside async function with `await`**
|
|
|
1048
1056
|
let pageSource = await I.grabSource();
|
|
1049
1057
|
```
|
|
1050
1058
|
|
|
1051
|
-
Returns **[Promise][
|
|
1059
|
+
Returns **[Promise][11]<[string][6]>** source code
|
|
1052
1060
|
|
|
1053
1061
|
### grabTextFrom
|
|
1054
1062
|
|
|
@@ -1063,9 +1071,9 @@ If multiple elements found returns first element.
|
|
|
1063
1071
|
|
|
1064
1072
|
#### Parameters
|
|
1065
1073
|
|
|
1066
|
-
- `locator` **([string][
|
|
1074
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1067
1075
|
|
|
1068
|
-
Returns **[Promise][
|
|
1076
|
+
Returns **[Promise][11]<[string][6]>** attribute value
|
|
1069
1077
|
|
|
1070
1078
|
|
|
1071
1079
|
This action supports [React locators](https://codecept.io/react#locators)
|
|
@@ -1082,9 +1090,9 @@ let pins = await I.grabTextFromAll('#pin li');
|
|
|
1082
1090
|
|
|
1083
1091
|
#### Parameters
|
|
1084
1092
|
|
|
1085
|
-
- `locator` **([string][
|
|
1093
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1086
1094
|
|
|
1087
|
-
Returns **[Promise][
|
|
1095
|
+
Returns **[Promise][11]<[Array][12]<[string][6]>>** attribute value
|
|
1088
1096
|
|
|
1089
1097
|
|
|
1090
1098
|
This action supports [React locators](https://codecept.io/react#locators)
|
|
@@ -1099,7 +1107,7 @@ Resumes test execution, so **should be used inside async with `await`** operator
|
|
|
1099
1107
|
let title = await I.grabTitle();
|
|
1100
1108
|
```
|
|
1101
1109
|
|
|
1102
|
-
Returns **[Promise][
|
|
1110
|
+
Returns **[Promise][11]<[string][6]>** title
|
|
1103
1111
|
|
|
1104
1112
|
### grabValueFrom
|
|
1105
1113
|
|
|
@@ -1113,9 +1121,9 @@ let email = await I.grabValueFrom('input[name=email]');
|
|
|
1113
1121
|
|
|
1114
1122
|
#### Parameters
|
|
1115
1123
|
|
|
1116
|
-
- `locator` **([string][
|
|
1124
|
+
- `locator` **([string][6] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
1117
1125
|
|
|
1118
|
-
Returns **[Promise][
|
|
1126
|
+
Returns **[Promise][11]<[string][6]>** attribute value
|
|
1119
1127
|
|
|
1120
1128
|
### grabValueFromAll
|
|
1121
1129
|
|
|
@@ -1128,14 +1136,14 @@ let inputs = await I.grabValueFromAll('//form/input');
|
|
|
1128
1136
|
|
|
1129
1137
|
#### Parameters
|
|
1130
1138
|
|
|
1131
|
-
- `locator` **([string][
|
|
1139
|
+
- `locator` **([string][6] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
1132
1140
|
|
|
1133
|
-
Returns **[Promise][
|
|
1141
|
+
Returns **[Promise][11]<[Array][12]<[string][6]>>** attribute value
|
|
1134
1142
|
|
|
1135
1143
|
### handleDownloads
|
|
1136
1144
|
|
|
1137
1145
|
Sets a directory to where save files. Allows to test file downloads.
|
|
1138
|
-
Should be used with [FileSystem helper][
|
|
1146
|
+
Should be used with [FileSystem helper][13] to check that file were downloaded correctly.
|
|
1139
1147
|
|
|
1140
1148
|
By default files are saved to `output/downloads`.
|
|
1141
1149
|
This directory is cleaned on every `handleDownloads` call, to ensure no old files are kept.
|
|
@@ -1149,7 +1157,7 @@ I.seeFile('avatar.jpg');
|
|
|
1149
1157
|
|
|
1150
1158
|
#### Parameters
|
|
1151
1159
|
|
|
1152
|
-
- `downloadPath` **[string][
|
|
1160
|
+
- `downloadPath` **[string][6]** change this parameter to set another directory for saving
|
|
1153
1161
|
|
|
1154
1162
|
### haveRequestHeaders
|
|
1155
1163
|
|
|
@@ -1163,7 +1171,7 @@ I.haveRequestHeaders({
|
|
|
1163
1171
|
|
|
1164
1172
|
#### Parameters
|
|
1165
1173
|
|
|
1166
|
-
- `customHeaders` **[object][
|
|
1174
|
+
- `customHeaders` **[object][4]** headers to set
|
|
1167
1175
|
|
|
1168
1176
|
### moveCursorTo
|
|
1169
1177
|
|
|
@@ -1177,9 +1185,9 @@ I.moveCursorTo('#submit', 5,5);
|
|
|
1177
1185
|
|
|
1178
1186
|
#### Parameters
|
|
1179
1187
|
|
|
1180
|
-
- `locator` **([string][
|
|
1181
|
-
- `offsetX` **[number][
|
|
1182
|
-
- `offsetY` **[number][
|
|
1188
|
+
- `locator` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
|
|
1189
|
+
- `offsetX` **[number][8]** (optional, `0` by default) X-axis offset.
|
|
1190
|
+
- `offsetY` **[number][8]** (optional, `0` by default) Y-axis offset.
|
|
1183
1191
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1184
1192
|
|
|
1185
1193
|
|
|
@@ -1199,7 +1207,7 @@ I.openNewTab();
|
|
|
1199
1207
|
|
|
1200
1208
|
Presses a key in the browser (on a focused element).
|
|
1201
1209
|
|
|
1202
|
-
_Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][
|
|
1210
|
+
_Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][14].
|
|
1203
1211
|
|
|
1204
1212
|
```js
|
|
1205
1213
|
I.pressKey('Backspace');
|
|
@@ -1258,14 +1266,14 @@ Some of the supported key names are:
|
|
|
1258
1266
|
|
|
1259
1267
|
#### Parameters
|
|
1260
1268
|
|
|
1261
|
-
- `key` **([string][
|
|
1262
|
-
[!] returns a _promise_ which is synchronized internally by recorder_Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313][
|
|
1269
|
+
- `key` **([string][6] | [Array][12]<[string][6]>)** key or array of keys to press.
|
|
1270
|
+
[!] returns a _promise_ which is synchronized internally by recorder_Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313][15]).
|
|
1263
1271
|
|
|
1264
1272
|
### pressKeyDown
|
|
1265
1273
|
|
|
1266
1274
|
Presses a key in the browser and leaves it in a down state.
|
|
1267
1275
|
|
|
1268
|
-
To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][
|
|
1276
|
+
To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][16]).
|
|
1269
1277
|
|
|
1270
1278
|
```js
|
|
1271
1279
|
I.pressKeyDown('Control');
|
|
@@ -1275,14 +1283,14 @@ I.pressKeyUp('Control');
|
|
|
1275
1283
|
|
|
1276
1284
|
#### Parameters
|
|
1277
1285
|
|
|
1278
|
-
- `key` **[string][
|
|
1286
|
+
- `key` **[string][6]** name of key to press down.
|
|
1279
1287
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1280
1288
|
|
|
1281
1289
|
### pressKeyUp
|
|
1282
1290
|
|
|
1283
1291
|
Releases a key in the browser which was previously set to a down state.
|
|
1284
1292
|
|
|
1285
|
-
To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][
|
|
1293
|
+
To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][16]).
|
|
1286
1294
|
|
|
1287
1295
|
```js
|
|
1288
1296
|
I.pressKeyDown('Control');
|
|
@@ -1292,7 +1300,7 @@ I.pressKeyUp('Control');
|
|
|
1292
1300
|
|
|
1293
1301
|
#### Parameters
|
|
1294
1302
|
|
|
1295
|
-
- `key` **[string][
|
|
1303
|
+
- `key` **[string][6]** name of key to release.
|
|
1296
1304
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1297
1305
|
|
|
1298
1306
|
### refreshPage
|
|
@@ -1312,8 +1320,8 @@ First parameter can be set to `maximize`.
|
|
|
1312
1320
|
|
|
1313
1321
|
#### Parameters
|
|
1314
1322
|
|
|
1315
|
-
- `width` **[number][
|
|
1316
|
-
- `height` **[number][
|
|
1323
|
+
- `width` **[number][8]** width in pixels or `maximize`.
|
|
1324
|
+
- `height` **[number][8]** height in pixels.
|
|
1317
1325
|
[!] returns a _promise_ which is synchronized internally by recorderUnlike other drivers Puppeteer changes the size of a viewport, not the window!
|
|
1318
1326
|
Puppeteer does not control the window of a browser so it can't adjust its real size.
|
|
1319
1327
|
It also can't maximize a window.
|
|
@@ -1333,8 +1341,8 @@ I.rightClick('Click me', '.context');
|
|
|
1333
1341
|
|
|
1334
1342
|
#### Parameters
|
|
1335
1343
|
|
|
1336
|
-
- `locator` **([string][
|
|
1337
|
-
- `context` **([string][
|
|
1344
|
+
- `locator` **([string][6] | [object][4])** clickable element located by CSS|XPath|strict locator.
|
|
1345
|
+
- `context` **([string][6]? | [object][4])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1338
1346
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1339
1347
|
|
|
1340
1348
|
|
|
@@ -1352,8 +1360,8 @@ I.saveElementScreenshot(`#submit`,'debug.png');
|
|
|
1352
1360
|
|
|
1353
1361
|
#### Parameters
|
|
1354
1362
|
|
|
1355
|
-
- `locator` **([string][
|
|
1356
|
-
- `fileName` **[string][
|
|
1363
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1364
|
+
- `fileName` **[string][6]** file name to save.
|
|
1357
1365
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1358
1366
|
|
|
1359
1367
|
### saveScreenshot
|
|
@@ -1369,8 +1377,8 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
|
|
|
1369
1377
|
|
|
1370
1378
|
#### Parameters
|
|
1371
1379
|
|
|
1372
|
-
- `fileName` **[string][
|
|
1373
|
-
- `fullPage` **[boolean][
|
|
1380
|
+
- `fileName` **[string][6]** file name to save.
|
|
1381
|
+
- `fullPage` **[boolean][17]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
1374
1382
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1375
1383
|
|
|
1376
1384
|
### scrollPageToBottom
|
|
@@ -1405,9 +1413,9 @@ I.scrollTo('#submit', 5, 5);
|
|
|
1405
1413
|
|
|
1406
1414
|
#### Parameters
|
|
1407
1415
|
|
|
1408
|
-
- `locator` **([string][
|
|
1409
|
-
- `offsetX` **[number][
|
|
1410
|
-
- `offsetY` **[number][
|
|
1416
|
+
- `locator` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
|
|
1417
|
+
- `offsetX` **[number][8]** (optional, `0` by default) X-axis offset.
|
|
1418
|
+
- `offsetY` **[number][8]** (optional, `0` by default) Y-axis offset.
|
|
1411
1419
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1412
1420
|
|
|
1413
1421
|
### see
|
|
@@ -1423,8 +1431,8 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
1423
1431
|
|
|
1424
1432
|
#### Parameters
|
|
1425
1433
|
|
|
1426
|
-
- `text` **[string][
|
|
1427
|
-
- `context` **([string][
|
|
1434
|
+
- `text` **[string][6]** expected on page.
|
|
1435
|
+
- `context` **([string][6]? | [object][4])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1428
1436
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1429
1437
|
|
|
1430
1438
|
|
|
@@ -1441,8 +1449,8 @@ I.seeAttributesOnElements('//form', { method: "post"});
|
|
|
1441
1449
|
|
|
1442
1450
|
#### Parameters
|
|
1443
1451
|
|
|
1444
|
-
- `locator` **([string][
|
|
1445
|
-
- `attributes` **[object][
|
|
1452
|
+
- `locator` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
|
|
1453
|
+
- `attributes` **[object][4]** attributes and their values to check.
|
|
1446
1454
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1447
1455
|
|
|
1448
1456
|
|
|
@@ -1462,7 +1470,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
1462
1470
|
|
|
1463
1471
|
#### Parameters
|
|
1464
1472
|
|
|
1465
|
-
- `field` **([string][
|
|
1473
|
+
- `field` **([string][6] | [object][4])** located by label|name|CSS|XPath|strict locator.
|
|
1466
1474
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1467
1475
|
|
|
1468
1476
|
### seeCookie
|
|
@@ -1475,7 +1483,7 @@ I.seeCookie('Auth');
|
|
|
1475
1483
|
|
|
1476
1484
|
#### Parameters
|
|
1477
1485
|
|
|
1478
|
-
- `name` **[string][
|
|
1486
|
+
- `name` **[string][6]** cookie name.
|
|
1479
1487
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1480
1488
|
|
|
1481
1489
|
### seeCssPropertiesOnElements
|
|
@@ -1488,8 +1496,8 @@ I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
|
|
|
1488
1496
|
|
|
1489
1497
|
#### Parameters
|
|
1490
1498
|
|
|
1491
|
-
- `locator` **([string][
|
|
1492
|
-
- `cssProperties` **[object][
|
|
1499
|
+
- `locator` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
|
|
1500
|
+
- `cssProperties` **[object][4]** object with CSS properties and their values to check.
|
|
1493
1501
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1494
1502
|
|
|
1495
1503
|
|
|
@@ -1510,7 +1518,7 @@ I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
|
1510
1518
|
|
|
1511
1519
|
#### Parameters
|
|
1512
1520
|
|
|
1513
|
-
- `url` **[string][
|
|
1521
|
+
- `url` **[string][6]** value to check.
|
|
1514
1522
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1515
1523
|
|
|
1516
1524
|
### seeElement
|
|
@@ -1524,7 +1532,7 @@ I.seeElement('#modal');
|
|
|
1524
1532
|
|
|
1525
1533
|
#### Parameters
|
|
1526
1534
|
|
|
1527
|
-
- `locator` **([string][
|
|
1535
|
+
- `locator` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
|
|
1528
1536
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1529
1537
|
|
|
1530
1538
|
|
|
@@ -1543,7 +1551,7 @@ I.seeElementInDOM('#modal');
|
|
|
1543
1551
|
|
|
1544
1552
|
#### Parameters
|
|
1545
1553
|
|
|
1546
|
-
- `locator` **([string][
|
|
1554
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1547
1555
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1548
1556
|
|
|
1549
1557
|
### seeInCurrentUrl
|
|
@@ -1556,7 +1564,7 @@ I.seeInCurrentUrl('/register'); // we are on registration page
|
|
|
1556
1564
|
|
|
1557
1565
|
#### Parameters
|
|
1558
1566
|
|
|
1559
|
-
- `url` **[string][
|
|
1567
|
+
- `url` **[string][6]** a fragment to check
|
|
1560
1568
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1561
1569
|
|
|
1562
1570
|
### seeInField
|
|
@@ -1573,8 +1581,8 @@ I.seeInField('#searchform input','Search');
|
|
|
1573
1581
|
|
|
1574
1582
|
#### Parameters
|
|
1575
1583
|
|
|
1576
|
-
- `field` **([string][
|
|
1577
|
-
- `value` **[string][
|
|
1584
|
+
- `field` **([string][6] | [object][4])** located by label|name|CSS|XPath|strict locator.
|
|
1585
|
+
- `value` **[string][6]** value to check.
|
|
1578
1586
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1579
1587
|
|
|
1580
1588
|
### seeInPopup
|
|
@@ -1588,7 +1596,7 @@ I.seeInPopup('Popup text');
|
|
|
1588
1596
|
|
|
1589
1597
|
#### Parameters
|
|
1590
1598
|
|
|
1591
|
-
- `text` **[string][
|
|
1599
|
+
- `text` **[string][6]** value to check.
|
|
1592
1600
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1593
1601
|
|
|
1594
1602
|
### seeInSource
|
|
@@ -1601,7 +1609,7 @@ I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
|
1601
1609
|
|
|
1602
1610
|
#### Parameters
|
|
1603
1611
|
|
|
1604
|
-
- `text` **[string][
|
|
1612
|
+
- `text` **[string][6]** value to check.
|
|
1605
1613
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1606
1614
|
|
|
1607
1615
|
### seeInTitle
|
|
@@ -1614,7 +1622,7 @@ I.seeInTitle('Home Page');
|
|
|
1614
1622
|
|
|
1615
1623
|
#### Parameters
|
|
1616
1624
|
|
|
1617
|
-
- `text` **[string][
|
|
1625
|
+
- `text` **[string][6]** text value to check.
|
|
1618
1626
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1619
1627
|
|
|
1620
1628
|
### seeNumberOfElements
|
|
@@ -1628,8 +1636,8 @@ I.seeNumberOfElements('#submitBtn', 1);
|
|
|
1628
1636
|
|
|
1629
1637
|
#### Parameters
|
|
1630
1638
|
|
|
1631
|
-
- `locator` **([string][
|
|
1632
|
-
- `num` **[number][
|
|
1639
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1640
|
+
- `num` **[number][8]** number of elements.
|
|
1633
1641
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1634
1642
|
|
|
1635
1643
|
|
|
@@ -1647,8 +1655,8 @@ I.seeNumberOfVisibleElements('.buttons', 3);
|
|
|
1647
1655
|
|
|
1648
1656
|
#### Parameters
|
|
1649
1657
|
|
|
1650
|
-
- `locator` **([string][
|
|
1651
|
-
- `num` **[number][
|
|
1658
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1659
|
+
- `num` **[number][8]** number of elements.
|
|
1652
1660
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1653
1661
|
|
|
1654
1662
|
|
|
@@ -1665,8 +1673,8 @@ I.seeTextEquals('text', 'h1');
|
|
|
1665
1673
|
|
|
1666
1674
|
#### Parameters
|
|
1667
1675
|
|
|
1668
|
-
- `text` **[string][
|
|
1669
|
-
- `context` **([string][
|
|
1676
|
+
- `text` **[string][6]** element value to check.
|
|
1677
|
+
- `context` **([string][6] | [object][4])?** element located by CSS|XPath|strict locator.
|
|
1670
1678
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1671
1679
|
|
|
1672
1680
|
### seeTitleEquals
|
|
@@ -1679,7 +1687,7 @@ I.seeTitleEquals('Test title.');
|
|
|
1679
1687
|
|
|
1680
1688
|
#### Parameters
|
|
1681
1689
|
|
|
1682
|
-
- `text` **[string][
|
|
1690
|
+
- `text` **[string][6]** value to check.
|
|
1683
1691
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1684
1692
|
|
|
1685
1693
|
### selectOption
|
|
@@ -1705,8 +1713,8 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
1705
1713
|
|
|
1706
1714
|
#### Parameters
|
|
1707
1715
|
|
|
1708
|
-
- `select` **([string][
|
|
1709
|
-
- `option` **([string][
|
|
1716
|
+
- `select` **([string][6] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
1717
|
+
- `option` **([string][6] | [Array][12]<any>)** visible text or value of option.
|
|
1710
1718
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1711
1719
|
|
|
1712
1720
|
### setCookie
|
|
@@ -1727,7 +1735,7 @@ I.setCookie([
|
|
|
1727
1735
|
|
|
1728
1736
|
#### Parameters
|
|
1729
1737
|
|
|
1730
|
-
- `cookie` **(Cookie | [Array][
|
|
1738
|
+
- `cookie` **(Cookie | [Array][12]<Cookie>)** a cookie object or array of cookie objects.
|
|
1731
1739
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1732
1740
|
|
|
1733
1741
|
### switchTo
|
|
@@ -1741,7 +1749,7 @@ I.switchTo(); // switch back to main page
|
|
|
1741
1749
|
|
|
1742
1750
|
#### Parameters
|
|
1743
1751
|
|
|
1744
|
-
- `locator` **([string][
|
|
1752
|
+
- `locator` **([string][6]? | [object][4])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1745
1753
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1746
1754
|
|
|
1747
1755
|
### switchToNextTab
|
|
@@ -1755,7 +1763,7 @@ I.switchToNextTab(2);
|
|
|
1755
1763
|
|
|
1756
1764
|
#### Parameters
|
|
1757
1765
|
|
|
1758
|
-
- `num` **[number][
|
|
1766
|
+
- `num` **[number][8]**
|
|
1759
1767
|
|
|
1760
1768
|
### switchToPreviousTab
|
|
1761
1769
|
|
|
@@ -1768,13 +1776,13 @@ I.switchToPreviousTab(2);
|
|
|
1768
1776
|
|
|
1769
1777
|
#### Parameters
|
|
1770
1778
|
|
|
1771
|
-
- `num` **[number][
|
|
1779
|
+
- `num` **[number][8]**
|
|
1772
1780
|
|
|
1773
1781
|
### type
|
|
1774
1782
|
|
|
1775
1783
|
Types out the given text into an active field.
|
|
1776
1784
|
To slow down typing use a second parameter, to set interval between key presses.
|
|
1777
|
-
_Note:_ Should be used when [`fillField`][
|
|
1785
|
+
_Note:_ Should be used when [`fillField`][14] is not an option.
|
|
1778
1786
|
|
|
1779
1787
|
```js
|
|
1780
1788
|
// passing in a string
|
|
@@ -1790,9 +1798,9 @@ I.type(['T', 'E', 'X', 'T']);
|
|
|
1790
1798
|
#### Parameters
|
|
1791
1799
|
|
|
1792
1800
|
- `keys`
|
|
1793
|
-
- `delay` **[number][
|
|
1801
|
+
- `delay` **[number][8]?** (optional) delay in ms between key presses
|
|
1794
1802
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1795
|
-
- `key` **([string][
|
|
1803
|
+
- `key` **([string][6] | [Array][12]<[string][6]>)** or array of keys to type.
|
|
1796
1804
|
|
|
1797
1805
|
### uncheckOption
|
|
1798
1806
|
|
|
@@ -1809,8 +1817,8 @@ I.uncheckOption('agree', '//form');
|
|
|
1809
1817
|
|
|
1810
1818
|
#### Parameters
|
|
1811
1819
|
|
|
1812
|
-
- `field` **([string][
|
|
1813
|
-
- `context` **([string][
|
|
1820
|
+
- `field` **([string][6] | [object][4])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
1821
|
+
- `context` **([string][6]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1814
1822
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1815
1823
|
|
|
1816
1824
|
### usePuppeteerTo
|
|
@@ -1820,7 +1828,7 @@ Use Puppeteer API inside a test.
|
|
|
1820
1828
|
First argument is a description of an action.
|
|
1821
1829
|
Second argument is async function that gets this helper as parameter.
|
|
1822
1830
|
|
|
1823
|
-
{ [`page`][
|
|
1831
|
+
{ [`page`][18], [`browser`][19] } from Puppeteer API are available.
|
|
1824
1832
|
|
|
1825
1833
|
```js
|
|
1826
1834
|
I.usePuppeteerTo('emulate offline mode', async ({ page }) {
|
|
@@ -1830,8 +1838,8 @@ I.usePuppeteerTo('emulate offline mode', async ({ page }) {
|
|
|
1830
1838
|
|
|
1831
1839
|
#### Parameters
|
|
1832
1840
|
|
|
1833
|
-
- `description` **[string][
|
|
1834
|
-
- `fn` **[function][
|
|
1841
|
+
- `description` **[string][6]** used to show in logs.
|
|
1842
|
+
- `fn` **[function][10]** async function that is executed with Puppeteer as argument
|
|
1835
1843
|
|
|
1836
1844
|
### wait
|
|
1837
1845
|
|
|
@@ -1843,7 +1851,7 @@ I.wait(2); // wait 2 secs
|
|
|
1843
1851
|
|
|
1844
1852
|
#### Parameters
|
|
1845
1853
|
|
|
1846
|
-
- `sec` **[number][
|
|
1854
|
+
- `sec` **[number][8]** number of second to wait.
|
|
1847
1855
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1848
1856
|
|
|
1849
1857
|
### waitForClickable
|
|
@@ -1858,9 +1866,9 @@ I.waitForClickable('.btn.continue', 5); // wait for 5 secs
|
|
|
1858
1866
|
|
|
1859
1867
|
#### Parameters
|
|
1860
1868
|
|
|
1861
|
-
- `locator` **([string][
|
|
1869
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1862
1870
|
- `waitTimeout`
|
|
1863
|
-
- `sec` **[number][
|
|
1871
|
+
- `sec` **[number][8]?** (optional, `1` by default) time in seconds to wait
|
|
1864
1872
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1865
1873
|
|
|
1866
1874
|
### waitForDetached
|
|
@@ -1874,8 +1882,8 @@ I.waitForDetached('#popup');
|
|
|
1874
1882
|
|
|
1875
1883
|
#### Parameters
|
|
1876
1884
|
|
|
1877
|
-
- `locator` **([string][
|
|
1878
|
-
- `sec` **[number][
|
|
1885
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1886
|
+
- `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1879
1887
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1880
1888
|
|
|
1881
1889
|
### waitForElement
|
|
@@ -1890,8 +1898,8 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
1890
1898
|
|
|
1891
1899
|
#### Parameters
|
|
1892
1900
|
|
|
1893
|
-
- `locator` **([string][
|
|
1894
|
-
- `sec` **[number][
|
|
1901
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1902
|
+
- `sec` **[number][8]?** (optional, `1` by default) time in seconds to wait
|
|
1895
1903
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1896
1904
|
|
|
1897
1905
|
|
|
@@ -1906,8 +1914,8 @@ Element can be located by CSS or XPath.
|
|
|
1906
1914
|
|
|
1907
1915
|
#### Parameters
|
|
1908
1916
|
|
|
1909
|
-
- `locator` **([string][
|
|
1910
|
-
- `sec` **[number][
|
|
1917
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1918
|
+
- `sec` **[number][8]** (optional) time in seconds to wait, 1 by default.
|
|
1911
1919
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1912
1920
|
|
|
1913
1921
|
### waitForFunction
|
|
@@ -1927,9 +1935,9 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
|
|
|
1927
1935
|
|
|
1928
1936
|
#### Parameters
|
|
1929
1937
|
|
|
1930
|
-
- `fn` **([string][
|
|
1931
|
-
- `argsOrSec` **([Array][
|
|
1932
|
-
- `sec` **[number][
|
|
1938
|
+
- `fn` **([string][6] | [function][10])** to be executed in browser context.
|
|
1939
|
+
- `argsOrSec` **([Array][12]<any> | [number][8])?** (optional, `1` by default) arguments for function or seconds.
|
|
1940
|
+
- `sec` **[number][8]?** (optional, `1` by default) time in seconds to wait
|
|
1933
1941
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1934
1942
|
|
|
1935
1943
|
### waitForInvisible
|
|
@@ -1943,15 +1951,15 @@ I.waitForInvisible('#popup');
|
|
|
1943
1951
|
|
|
1944
1952
|
#### Parameters
|
|
1945
1953
|
|
|
1946
|
-
- `locator` **([string][
|
|
1947
|
-
- `sec` **[number][
|
|
1954
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1955
|
+
- `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1948
1956
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1949
1957
|
|
|
1950
1958
|
### waitForNavigation
|
|
1951
1959
|
|
|
1952
1960
|
Waits for navigation to finish. By default takes configured `waitForNavigation` option.
|
|
1953
1961
|
|
|
1954
|
-
See [Pupeteer's reference][
|
|
1962
|
+
See [Pupeteer's reference][20]
|
|
1955
1963
|
|
|
1956
1964
|
#### Parameters
|
|
1957
1965
|
|
|
@@ -1968,8 +1976,8 @@ I.waitForRequest(request => request.url() === 'http://example.com' && request.me
|
|
|
1968
1976
|
|
|
1969
1977
|
#### Parameters
|
|
1970
1978
|
|
|
1971
|
-
- `urlOrPredicate` **([string][
|
|
1972
|
-
- `sec` **[number][
|
|
1979
|
+
- `urlOrPredicate` **([string][6] | [function][10])**
|
|
1980
|
+
- `sec` **[number][8]?** seconds to wait
|
|
1973
1981
|
|
|
1974
1982
|
### waitForResponse
|
|
1975
1983
|
|
|
@@ -1982,8 +1990,8 @@ I.waitForResponse(response => response.url() === 'http://example.com' && respons
|
|
|
1982
1990
|
|
|
1983
1991
|
#### Parameters
|
|
1984
1992
|
|
|
1985
|
-
- `urlOrPredicate` **([string][
|
|
1986
|
-
- `sec` **[number][
|
|
1993
|
+
- `urlOrPredicate` **([string][6] | [function][10])**
|
|
1994
|
+
- `sec` **[number][8]?** number of seconds to wait
|
|
1987
1995
|
|
|
1988
1996
|
### waitForText
|
|
1989
1997
|
|
|
@@ -1998,9 +2006,9 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
1998
2006
|
|
|
1999
2007
|
#### Parameters
|
|
2000
2008
|
|
|
2001
|
-
- `text` **[string][
|
|
2002
|
-
- `sec` **[number][
|
|
2003
|
-
- `context` **([string][
|
|
2009
|
+
- `text` **[string][6]** to wait for.
|
|
2010
|
+
- `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
2011
|
+
- `context` **([string][6] | [object][4])?** (optional) element located by CSS|XPath|strict locator.
|
|
2004
2012
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
2005
2013
|
|
|
2006
2014
|
### waitForValue
|
|
@@ -2013,9 +2021,9 @@ I.waitForValue('//input', "GoodValue");
|
|
|
2013
2021
|
|
|
2014
2022
|
#### Parameters
|
|
2015
2023
|
|
|
2016
|
-
- `field` **([string][
|
|
2017
|
-
- `value` **[string][
|
|
2018
|
-
- `sec` **[number][
|
|
2024
|
+
- `field` **([string][6] | [object][4])** input field.
|
|
2025
|
+
- `value` **[string][6]** expected value.
|
|
2026
|
+
- `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
2019
2027
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
2020
2028
|
|
|
2021
2029
|
### waitForVisible
|
|
@@ -2029,9 +2037,9 @@ I.waitForVisible('#popup');
|
|
|
2029
2037
|
|
|
2030
2038
|
#### Parameters
|
|
2031
2039
|
|
|
2032
|
-
- `locator` **([string][
|
|
2033
|
-
- `sec` **[number][
|
|
2034
|
-
[!] returns a _promise_ which is synchronized internally by recorderThis method accepts [React selectors][
|
|
2040
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
2041
|
+
- `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
2042
|
+
[!] returns a _promise_ which is synchronized internally by recorderThis method accepts [React selectors][21].
|
|
2035
2043
|
|
|
2036
2044
|
### waitInUrl
|
|
2037
2045
|
|
|
@@ -2043,8 +2051,8 @@ I.waitInUrl('/info', 2);
|
|
|
2043
2051
|
|
|
2044
2052
|
#### Parameters
|
|
2045
2053
|
|
|
2046
|
-
- `urlPart` **[string][
|
|
2047
|
-
- `sec` **[number][
|
|
2054
|
+
- `urlPart` **[string][6]** value to check.
|
|
2055
|
+
- `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
2048
2056
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
2049
2057
|
|
|
2050
2058
|
### waitNumberOfVisibleElements
|
|
@@ -2057,9 +2065,9 @@ I.waitNumberOfVisibleElements('a', 3);
|
|
|
2057
2065
|
|
|
2058
2066
|
#### Parameters
|
|
2059
2067
|
|
|
2060
|
-
- `locator` **([string][
|
|
2061
|
-
- `num` **[number][
|
|
2062
|
-
- `sec` **[number][
|
|
2068
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
2069
|
+
- `num` **[number][8]** number of elements.
|
|
2070
|
+
- `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
2063
2071
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
2064
2072
|
|
|
2065
2073
|
|
|
@@ -2078,8 +2086,8 @@ I.waitToHide('#popup');
|
|
|
2078
2086
|
|
|
2079
2087
|
#### Parameters
|
|
2080
2088
|
|
|
2081
|
-
- `locator` **([string][
|
|
2082
|
-
- `sec` **[number][
|
|
2089
|
+
- `locator` **([string][6] | [object][4])** element located by CSS|XPath|strict locator.
|
|
2090
|
+
- `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
2083
2091
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
2084
2092
|
|
|
2085
2093
|
### waitUrlEquals
|
|
@@ -2093,50 +2101,50 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
|
|
|
2093
2101
|
|
|
2094
2102
|
#### Parameters
|
|
2095
2103
|
|
|
2096
|
-
- `urlPart` **[string][
|
|
2097
|
-
- `sec` **[number][
|
|
2104
|
+
- `urlPart` **[string][6]** value to check.
|
|
2105
|
+
- `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
2098
2106
|
[!] returns a _promise_ which is synchronized internally by recorder
|
|
2099
2107
|
|
|
2100
|
-
|
|
2108
|
+
: https://github.com/GoogleChrome/puppeteer
|
|
2101
2109
|
|
|
2102
2110
|
[2]: https://codecept.io/helpers/Puppeteer-firefox
|
|
2103
2111
|
|
|
2104
|
-
[3]: https://github.
|
|
2112
|
+
[3]: https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target
|
|
2105
2113
|
|
|
2106
|
-
[4]: https://
|
|
2114
|
+
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
2107
2115
|
|
|
2108
|
-
[5]:
|
|
2116
|
+
[5]: http://jster.net/category/windows-modals-popups
|
|
2109
2117
|
|
|
2110
|
-
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/
|
|
2118
|
+
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
2111
2119
|
|
|
2112
|
-
[7]:
|
|
2120
|
+
[7]: https://github.com/puppeteer/puppeteer/issues/5420
|
|
2113
2121
|
|
|
2114
|
-
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/
|
|
2122
|
+
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
2115
2123
|
|
|
2116
|
-
[9]: https://
|
|
2124
|
+
[9]: https://vuejs.org/v2/api/#Vue-nextTick
|
|
2117
2125
|
|
|
2118
|
-
[10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
2126
|
+
[10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
|
|
2119
2127
|
|
|
2120
|
-
[11]: https://
|
|
2128
|
+
[11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
|
2121
2129
|
|
|
2122
|
-
[12]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
2130
|
+
[12]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
2123
2131
|
|
|
2124
|
-
[13]: https://
|
|
2132
|
+
[13]: https://codecept.io/helpers/FileSystem
|
|
2125
2133
|
|
|
2126
|
-
[14]:
|
|
2134
|
+
[14]: #fillfield
|
|
2127
2135
|
|
|
2128
|
-
[15]: https://
|
|
2136
|
+
[15]: https://github.com/GoogleChrome/puppeteer/issues/1313
|
|
2129
2137
|
|
|
2130
|
-
[16]: #
|
|
2138
|
+
[16]: #click
|
|
2131
2139
|
|
|
2132
|
-
[17]: https://
|
|
2140
|
+
[17]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
2133
2141
|
|
|
2134
|
-
[18]: #
|
|
2142
|
+
[18]: https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#class-page
|
|
2135
2143
|
|
|
2136
|
-
[19]: https://
|
|
2144
|
+
[19]: https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#class-browser
|
|
2137
2145
|
|
|
2138
|
-
[20]: https://github.com/
|
|
2146
|
+
[20]: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions
|
|
2139
2147
|
|
|
2140
|
-
[21]: https://
|
|
2148
|
+
[21]: https://codecept.io/react
|
|
2141
2149
|
|
|
2142
|
-
[22]: https://
|
|
2150
|
+
[22]: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions
|