codeceptjs 3.3.7-beta.1 → 3.3.7
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/docs/basics.md +2 -3
- package/docs/bdd.md +33 -0
- package/docs/best.md +8 -8
- package/docs/build/Appium.js +60 -22
- package/docs/build/GraphQL.js +6 -6
- package/docs/build/Nightmare.js +4 -4
- package/docs/build/Playwright.js +102 -39
- package/docs/build/Polly.js +0 -0
- package/docs/build/Protractor.js +25 -25
- package/docs/build/Puppeteer.js +7 -7
- package/docs/build/SeleniumWebdriver.js +0 -0
- package/docs/build/TestCafe.js +12 -12
- package/docs/build/WebDriver.js +32 -32
- package/docs/changelog.md +36 -1
- package/docs/helpers/Appium.md +103 -79
- package/docs/helpers/GraphQL.md +6 -6
- package/docs/helpers/Playwright.md +280 -245
- package/docs/helpers/Puppeteer.md +1 -1
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/WebDriver.md +2 -2
- package/docs/playwright.md +14 -0
- package/docs/quickstart.md +40 -13
- package/docs/translation.md +83 -56
- package/docs/typescript.md +49 -3
- package/docs/wiki/Books-&-Posts.md +0 -0
- package/docs/wiki/Community-Helpers-&-Plugins.md +0 -0
- package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +0 -0
- package/docs/wiki/Examples.md +0 -0
- package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +0 -0
- package/docs/wiki/Home.md +0 -0
- package/docs/wiki/Release-Process.md +0 -0
- package/docs/wiki/Roadmap.md +0 -0
- package/docs/wiki/Tests.md +0 -0
- package/docs/wiki/Upgrading-to-CodeceptJS-3.md +0 -0
- package/docs/wiki/Videos.md +0 -0
- package/lib/codecept.js +3 -1
- package/lib/command/definitions.js +26 -2
- package/lib/command/generate.js +23 -9
- package/lib/command/init.js +32 -7
- package/lib/command/run.js +5 -1
- package/lib/container.js +15 -15
- package/lib/helper/Appium.js +60 -22
- package/lib/helper/GraphQL.js +6 -6
- package/lib/helper/Nightmare.js +4 -4
- package/lib/helper/Playwright.js +102 -41
- package/lib/helper/Protractor.js +25 -25
- package/lib/helper/Puppeteer.js +7 -7
- package/lib/helper/TestCafe.js +12 -12
- package/lib/helper/WebDriver.js +32 -32
- package/lib/helper/errors/ElementNotFound.js +1 -1
- package/lib/helper/extras/PlaywrightRestartOpts.js +0 -2
- package/lib/interfaces/bdd.js +26 -1
- package/lib/listener/artifacts.js +19 -0
- package/lib/rerun.js +12 -13
- package/lib/step.js +5 -5
- package/lib/translation.js +32 -0
- package/package.json +11 -17
- package/translations/ru-RU.js +1 -0
- package/typings/index.d.ts +29 -1
- package/typings/promiseBasedTypes.d.ts +10466 -0
- package/typings/types.d.ts +62 -12
- package/CHANGELOG.md +0 -2340
package/docs/helpers/Appium.md
CHANGED
|
@@ -201,6 +201,20 @@ I.runInWeb(() => {
|
|
|
201
201
|
|
|
202
202
|
- `fn` **any**
|
|
203
203
|
|
|
204
|
+
### checkIfAppIsInstalled
|
|
205
|
+
|
|
206
|
+
Returns app installation status.
|
|
207
|
+
|
|
208
|
+
```js
|
|
209
|
+
I.checkIfAppIsInstalled("com.example.android.apis");
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
#### Parameters
|
|
213
|
+
|
|
214
|
+
- `bundleId` **[string][4]** String ID of bundled app
|
|
215
|
+
|
|
216
|
+
Returns **[Promise][5]<[boolean][6]>** Appium: support only Android
|
|
217
|
+
|
|
204
218
|
### seeAppIsInstalled
|
|
205
219
|
|
|
206
220
|
Check if an app is installed.
|
|
@@ -258,6 +272,14 @@ Appium: support only Android
|
|
|
258
272
|
- `appId` **[string][4]**
|
|
259
273
|
- `bundleId` **[string][4]?** ID of bundle
|
|
260
274
|
|
|
275
|
+
### resetApp
|
|
276
|
+
|
|
277
|
+
Reset the currently running app for current session.
|
|
278
|
+
|
|
279
|
+
```js
|
|
280
|
+
I.resetApp();
|
|
281
|
+
```
|
|
282
|
+
|
|
261
283
|
### seeCurrentActivityIs
|
|
262
284
|
|
|
263
285
|
Check current activity on an Android device.
|
|
@@ -326,7 +348,7 @@ Get list of all available contexts
|
|
|
326
348
|
|
|
327
349
|
let contexts = await I.grabAllContexts();
|
|
328
350
|
|
|
329
|
-
Returns **[Promise][5]<[Array][
|
|
351
|
+
Returns **[Promise][5]<[Array][7]<[string][4]>>** Appium: support Android and iOS
|
|
330
352
|
|
|
331
353
|
### grabContext
|
|
332
354
|
|
|
@@ -458,7 +480,7 @@ I.setNetworkConnection(4) // airplane mode off, wifi off, data on
|
|
|
458
480
|
I.setNetworkConnection(6) // airplane mode off, wifi on, data on
|
|
459
481
|
```
|
|
460
482
|
|
|
461
|
-
See corresponding [webdriverio reference][
|
|
483
|
+
See corresponding [webdriverio reference][8].
|
|
462
484
|
|
|
463
485
|
#### Parameters
|
|
464
486
|
|
|
@@ -476,7 +498,7 @@ I.setSettings({cyberdelia: 'open'});
|
|
|
476
498
|
|
|
477
499
|
#### Parameters
|
|
478
500
|
|
|
479
|
-
- `settings` **[object][
|
|
501
|
+
- `settings` **[object][9]** objectAppium: support Android and iOS
|
|
480
502
|
|
|
481
503
|
### hideDeviceKeyboard
|
|
482
504
|
|
|
@@ -501,7 +523,7 @@ Appium: support Android and iOS
|
|
|
501
523
|
### sendDeviceKeyEvent
|
|
502
524
|
|
|
503
525
|
Send a key event to the device.
|
|
504
|
-
List of keys: [https://developer.android.com/reference/android/view/KeyEvent.html][
|
|
526
|
+
List of keys: [https://developer.android.com/reference/android/view/KeyEvent.html][10]
|
|
505
527
|
|
|
506
528
|
```js
|
|
507
529
|
I.sendDeviceKeyEvent(3);
|
|
@@ -509,7 +531,7 @@ I.sendDeviceKeyEvent(3);
|
|
|
509
531
|
|
|
510
532
|
#### Parameters
|
|
511
533
|
|
|
512
|
-
- `keyValue` **[number][
|
|
534
|
+
- `keyValue` **[number][11]** Device specific key value
|
|
513
535
|
|
|
514
536
|
Returns **[Promise][5]<void>** Appium: support only Android
|
|
515
537
|
|
|
@@ -529,7 +551,7 @@ The Touch Action API provides the basis of all gestures that can be
|
|
|
529
551
|
automated in Appium. At its core is the ability to chain together ad hoc
|
|
530
552
|
individual actions, which will then be applied to an element in the
|
|
531
553
|
application on the device.
|
|
532
|
-
[See complete documentation][
|
|
554
|
+
[See complete documentation][12]
|
|
533
555
|
|
|
534
556
|
```js
|
|
535
557
|
I.makeTouchAction("~buttonStartWebviewCD", 'tap');
|
|
@@ -567,14 +589,14 @@ let locator = "#io.selendroid.testapp:id/LinearLayout1";
|
|
|
567
589
|
I.swipe(locator, 800, 1200, 1000);
|
|
568
590
|
```
|
|
569
591
|
|
|
570
|
-
[See complete reference][
|
|
592
|
+
[See complete reference][13]
|
|
571
593
|
|
|
572
594
|
#### Parameters
|
|
573
595
|
|
|
574
|
-
- `locator` **([string][4] \| [object][
|
|
575
|
-
- `xoffset` **[number][
|
|
576
|
-
- `yoffset` **[number][
|
|
577
|
-
- `speed` **[number][
|
|
596
|
+
- `locator` **([string][4] \| [object][9])**
|
|
597
|
+
- `xoffset` **[number][11]**
|
|
598
|
+
- `yoffset` **[number][11]**
|
|
599
|
+
- `speed` **[number][11]** (optional), 1000 by default (optional, default `1000`)
|
|
578
600
|
|
|
579
601
|
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
580
602
|
|
|
@@ -588,8 +610,8 @@ I.performSwipe({ x: 300, y: 100 }, { x: 200, y: 100 });
|
|
|
588
610
|
|
|
589
611
|
#### Parameters
|
|
590
612
|
|
|
591
|
-
- `from` **[object][
|
|
592
|
-
- `to` **[object][
|
|
613
|
+
- `from` **[object][9]**
|
|
614
|
+
- `to` **[object][9]** Appium: support Android and iOS
|
|
593
615
|
|
|
594
616
|
### swipeDown
|
|
595
617
|
|
|
@@ -604,9 +626,9 @@ I.swipeDown(locator, 1200, 1000); // set offset and speed
|
|
|
604
626
|
|
|
605
627
|
#### Parameters
|
|
606
628
|
|
|
607
|
-
- `locator` **([string][4] \| [object][
|
|
608
|
-
- `yoffset` **[number][
|
|
609
|
-
- `speed` **[number][
|
|
629
|
+
- `locator` **([string][4] \| [object][9])**
|
|
630
|
+
- `yoffset` **[number][11]?** (optional) (optional, default `1000`)
|
|
631
|
+
- `speed` **[number][11]** (optional), 1000 by default (optional, default `1000`)
|
|
610
632
|
|
|
611
633
|
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
612
634
|
|
|
@@ -623,9 +645,9 @@ I.swipeLeft(locator, 1200, 1000); // set offset and speed
|
|
|
623
645
|
|
|
624
646
|
#### Parameters
|
|
625
647
|
|
|
626
|
-
- `locator` **([string][4] \| [object][
|
|
627
|
-
- `xoffset` **[number][
|
|
628
|
-
- `speed` **[number][
|
|
648
|
+
- `locator` **([string][4] \| [object][9])**
|
|
649
|
+
- `xoffset` **[number][11]?** (optional) (optional, default `1000`)
|
|
650
|
+
- `speed` **[number][11]** (optional), 1000 by default (optional, default `1000`)
|
|
629
651
|
|
|
630
652
|
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
631
653
|
|
|
@@ -642,9 +664,9 @@ I.swipeRight(locator, 1200, 1000); // set offset and speed
|
|
|
642
664
|
|
|
643
665
|
#### Parameters
|
|
644
666
|
|
|
645
|
-
- `locator` **([string][4] \| [object][
|
|
646
|
-
- `xoffset` **[number][
|
|
647
|
-
- `speed` **[number][
|
|
667
|
+
- `locator` **([string][4] \| [object][9])**
|
|
668
|
+
- `xoffset` **[number][11]?** (optional) (optional, default `1000`)
|
|
669
|
+
- `speed` **[number][11]** (optional), 1000 by default (optional, default `1000`)
|
|
648
670
|
|
|
649
671
|
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
650
672
|
|
|
@@ -661,9 +683,9 @@ I.swipeUp(locator, 1200, 1000); // set offset and speed
|
|
|
661
683
|
|
|
662
684
|
#### Parameters
|
|
663
685
|
|
|
664
|
-
- `locator` **([string][4] \| [object][
|
|
665
|
-
- `yoffset` **[number][
|
|
666
|
-
- `speed` **[number][
|
|
686
|
+
- `locator` **([string][4] \| [object][9])**
|
|
687
|
+
- `yoffset` **[number][11]?** (optional) (optional, default `1000`)
|
|
688
|
+
- `speed` **[number][11]** (optional), 1000 by default (optional, default `1000`)
|
|
667
689
|
|
|
668
690
|
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
669
691
|
|
|
@@ -686,9 +708,9 @@ I.swipeTo(
|
|
|
686
708
|
- `searchableLocator` **[string][4]**
|
|
687
709
|
- `scrollLocator` **[string][4]**
|
|
688
710
|
- `direction` **[string][4]**
|
|
689
|
-
- `timeout` **[number][
|
|
690
|
-
- `offset` **[number][
|
|
691
|
-
- `speed` **[number][
|
|
711
|
+
- `timeout` **[number][11]**
|
|
712
|
+
- `offset` **[number][11]**
|
|
713
|
+
- `speed` **[number][11]**
|
|
692
714
|
|
|
693
715
|
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
694
716
|
|
|
@@ -721,7 +743,7 @@ Appium: support Android and iOS
|
|
|
721
743
|
|
|
722
744
|
#### Parameters
|
|
723
745
|
|
|
724
|
-
- `actions` **[Array][
|
|
746
|
+
- `actions` **[Array][7]** Array of touch actions
|
|
725
747
|
|
|
726
748
|
### pullFile
|
|
727
749
|
|
|
@@ -758,7 +780,7 @@ Perform a rotation gesture centered on the specified element.
|
|
|
758
780
|
I.rotate(120, 120)
|
|
759
781
|
```
|
|
760
782
|
|
|
761
|
-
See corresponding [webdriverio reference][
|
|
783
|
+
See corresponding [webdriverio reference][14].
|
|
762
784
|
|
|
763
785
|
#### Parameters
|
|
764
786
|
|
|
@@ -775,7 +797,7 @@ Returns **[Promise][5]<void>** Appium: support only iOS
|
|
|
775
797
|
|
|
776
798
|
Set immediate value in app.
|
|
777
799
|
|
|
778
|
-
See corresponding [webdriverio reference][
|
|
800
|
+
See corresponding [webdriverio reference][15].
|
|
779
801
|
|
|
780
802
|
#### Parameters
|
|
781
803
|
|
|
@@ -822,7 +844,7 @@ I.appendField('#myTextField', 'appended');
|
|
|
822
844
|
|
|
823
845
|
#### Parameters
|
|
824
846
|
|
|
825
|
-
- `field` **([string][4] \| [object][
|
|
847
|
+
- `field` **([string][4] \| [object][9])** located by label|name|CSS|XPath|strict locator
|
|
826
848
|
- `value` **[string][4]** text value to append.
|
|
827
849
|
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
828
850
|
|
|
@@ -841,8 +863,8 @@ I.checkOption('agree', '//form');
|
|
|
841
863
|
|
|
842
864
|
#### Parameters
|
|
843
865
|
|
|
844
|
-
- `field` **([string][4] \| [object][
|
|
845
|
-
- `context` **([string][4]? | [object][
|
|
866
|
+
- `field` **([string][4] \| [object][9])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
867
|
+
- `context` **([string][4]? | [object][9])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
846
868
|
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
847
869
|
|
|
848
870
|
### click
|
|
@@ -871,8 +893,8 @@ I.click({css: 'nav a.login'});
|
|
|
871
893
|
|
|
872
894
|
#### Parameters
|
|
873
895
|
|
|
874
|
-
- `locator` **([string][4] \| [object][
|
|
875
|
-
- `context` **([string][4]? | [object][
|
|
896
|
+
- `locator` **([string][4] \| [object][9])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
897
|
+
- `context` **([string][4]? | [object][9] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
876
898
|
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
877
899
|
|
|
878
900
|
### dontSeeCheckboxIsChecked
|
|
@@ -887,7 +909,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
887
909
|
|
|
888
910
|
#### Parameters
|
|
889
911
|
|
|
890
|
-
- `field` **([string][4] \| [object][
|
|
912
|
+
- `field` **([string][4] \| [object][9])** located by label|name|CSS|XPath|strict locator.
|
|
891
913
|
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
892
914
|
|
|
893
915
|
### dontSeeElement
|
|
@@ -900,7 +922,7 @@ I.dontSeeElement('.modal'); // modal is not shown
|
|
|
900
922
|
|
|
901
923
|
#### Parameters
|
|
902
924
|
|
|
903
|
-
- `locator` **([string][4] \| [object][
|
|
925
|
+
- `locator` **([string][4] \| [object][9])** located by CSS|XPath|Strict locator.
|
|
904
926
|
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
905
927
|
|
|
906
928
|
### dontSeeInField
|
|
@@ -915,7 +937,7 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
|
915
937
|
|
|
916
938
|
#### Parameters
|
|
917
939
|
|
|
918
|
-
- `field` **([string][4] \| [object][
|
|
940
|
+
- `field` **([string][4] \| [object][9])** located by label|name|CSS|XPath|strict locator.
|
|
919
941
|
- `value` **[string][4]** value to check.
|
|
920
942
|
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
921
943
|
|
|
@@ -932,7 +954,7 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
932
954
|
#### Parameters
|
|
933
955
|
|
|
934
956
|
- `text` **[string][4]** which is not present.
|
|
935
|
-
- `context` **([string][4] \| [object][
|
|
957
|
+
- `context` **([string][4] \| [object][9])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
936
958
|
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
937
959
|
|
|
938
960
|
### fillField
|
|
@@ -953,8 +975,8 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
|
953
975
|
|
|
954
976
|
#### Parameters
|
|
955
977
|
|
|
956
|
-
- `field` **([string][4] \| [object][
|
|
957
|
-
- `value` **([string][4] \| [object][
|
|
978
|
+
- `field` **([string][4] \| [object][9])** located by label|name|CSS|XPath|strict locator.
|
|
979
|
+
- `value` **([string][4] \| [object][9])** text value to fill.
|
|
958
980
|
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
959
981
|
|
|
960
982
|
### grabTextFromAll
|
|
@@ -968,9 +990,9 @@ let pins = await I.grabTextFromAll('#pin li');
|
|
|
968
990
|
|
|
969
991
|
#### Parameters
|
|
970
992
|
|
|
971
|
-
- `locator` **([string][4] \| [object][
|
|
993
|
+
- `locator` **([string][4] \| [object][9])** element located by CSS|XPath|strict locator.
|
|
972
994
|
|
|
973
|
-
Returns **[Promise][5]<[Array][
|
|
995
|
+
Returns **[Promise][5]<[Array][7]<[string][4]>>** attribute value
|
|
974
996
|
|
|
975
997
|
### grabTextFrom
|
|
976
998
|
|
|
@@ -985,7 +1007,7 @@ If multiple elements found returns first element.
|
|
|
985
1007
|
|
|
986
1008
|
#### Parameters
|
|
987
1009
|
|
|
988
|
-
- `locator` **([string][4] \| [object][
|
|
1010
|
+
- `locator` **([string][4] \| [object][9])** element located by CSS|XPath|strict locator.
|
|
989
1011
|
|
|
990
1012
|
Returns **[Promise][5]<[string][4]>** attribute value
|
|
991
1013
|
|
|
@@ -1000,9 +1022,9 @@ let numOfElements = await I.grabNumberOfVisibleElements('p');
|
|
|
1000
1022
|
|
|
1001
1023
|
#### Parameters
|
|
1002
1024
|
|
|
1003
|
-
- `locator` **([string][4] \| [object][
|
|
1025
|
+
- `locator` **([string][4] \| [object][9])** located by CSS|XPath|strict locator.
|
|
1004
1026
|
|
|
1005
|
-
Returns **[Promise][5]<[number][
|
|
1027
|
+
Returns **[Promise][5]<[number][11]>** number of visible elements
|
|
1006
1028
|
|
|
1007
1029
|
### grabAttributeFrom
|
|
1008
1030
|
|
|
@@ -1018,7 +1040,7 @@ let hint = await I.grabAttributeFrom('#tooltip', 'title');
|
|
|
1018
1040
|
|
|
1019
1041
|
#### Parameters
|
|
1020
1042
|
|
|
1021
|
-
- `locator` **([string][4] \| [object][
|
|
1043
|
+
- `locator` **([string][4] \| [object][9])** element located by CSS|XPath|strict locator.
|
|
1022
1044
|
- `attr` **[string][4]** attribute name.
|
|
1023
1045
|
|
|
1024
1046
|
Returns **[Promise][5]<[string][4]>** attribute value
|
|
@@ -1035,10 +1057,10 @@ let hints = await I.grabAttributeFromAll('.tooltip', 'title');
|
|
|
1035
1057
|
|
|
1036
1058
|
#### Parameters
|
|
1037
1059
|
|
|
1038
|
-
- `locator` **([string][4] \| [object][
|
|
1060
|
+
- `locator` **([string][4] \| [object][9])** element located by CSS|XPath|strict locator.
|
|
1039
1061
|
- `attr` **[string][4]** attribute name.
|
|
1040
1062
|
|
|
1041
|
-
Returns **[Promise][5]<[Array][
|
|
1063
|
+
Returns **[Promise][5]<[Array][7]<[string][4]>>** attribute value
|
|
1042
1064
|
|
|
1043
1065
|
### grabValueFromAll
|
|
1044
1066
|
|
|
@@ -1051,9 +1073,9 @@ let inputs = await I.grabValueFromAll('//form/input');
|
|
|
1051
1073
|
|
|
1052
1074
|
#### Parameters
|
|
1053
1075
|
|
|
1054
|
-
- `locator` **([string][4] \| [object][
|
|
1076
|
+
- `locator` **([string][4] \| [object][9])** field located by label|name|CSS|XPath|strict locator.
|
|
1055
1077
|
|
|
1056
|
-
Returns **[Promise][5]<[Array][
|
|
1078
|
+
Returns **[Promise][5]<[Array][7]<[string][4]>>** attribute value
|
|
1057
1079
|
|
|
1058
1080
|
### grabValueFrom
|
|
1059
1081
|
|
|
@@ -1067,7 +1089,7 @@ let email = await I.grabValueFrom('input[name=email]');
|
|
|
1067
1089
|
|
|
1068
1090
|
#### Parameters
|
|
1069
1091
|
|
|
1070
|
-
- `locator` **([string][4] \| [object][
|
|
1092
|
+
- `locator` **([string][4] \| [object][9])** field located by label|name|CSS|XPath|strict locator.
|
|
1071
1093
|
|
|
1072
1094
|
Returns **[Promise][5]<[string][4]>** attribute value
|
|
1073
1095
|
|
|
@@ -1098,8 +1120,8 @@ I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "cent
|
|
|
1098
1120
|
|
|
1099
1121
|
#### Parameters
|
|
1100
1122
|
|
|
1101
|
-
- `locator` **([string][4] \| [object][
|
|
1102
|
-
- `scrollIntoViewOptions` **ScrollIntoViewOptions** see [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][
|
|
1123
|
+
- `locator` **([string][4] \| [object][9])** located by CSS|XPath|strict locator.
|
|
1124
|
+
- `scrollIntoViewOptions` **ScrollIntoViewOptions** see [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][16].
|
|
1103
1125
|
⚠️ returns a _promise_ which is synchronized internally by recorderSupported only for web testing
|
|
1104
1126
|
|
|
1105
1127
|
### seeCheckboxIsChecked
|
|
@@ -1114,7 +1136,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
1114
1136
|
|
|
1115
1137
|
#### Parameters
|
|
1116
1138
|
|
|
1117
|
-
- `field` **([string][4] \| [object][
|
|
1139
|
+
- `field` **([string][4] \| [object][9])** located by label|name|CSS|XPath|strict locator.
|
|
1118
1140
|
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1119
1141
|
|
|
1120
1142
|
### seeElement
|
|
@@ -1128,7 +1150,7 @@ I.seeElement('#modal');
|
|
|
1128
1150
|
|
|
1129
1151
|
#### Parameters
|
|
1130
1152
|
|
|
1131
|
-
- `locator` **([string][4] \| [object][
|
|
1153
|
+
- `locator` **([string][4] \| [object][9])** located by CSS|XPath|strict locator.
|
|
1132
1154
|
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1133
1155
|
|
|
1134
1156
|
### seeInField
|
|
@@ -1145,7 +1167,7 @@ I.seeInField('#searchform input','Search');
|
|
|
1145
1167
|
|
|
1146
1168
|
#### Parameters
|
|
1147
1169
|
|
|
1148
|
-
- `field` **([string][4] \| [object][
|
|
1170
|
+
- `field` **([string][4] \| [object][9])** located by label|name|CSS|XPath|strict locator.
|
|
1149
1171
|
- `value` **[string][4]** value to check.
|
|
1150
1172
|
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1151
1173
|
|
|
@@ -1163,7 +1185,7 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
1163
1185
|
#### Parameters
|
|
1164
1186
|
|
|
1165
1187
|
- `text` **[string][4]** expected on page.
|
|
1166
|
-
- `context` **([string][4]? | [object][
|
|
1188
|
+
- `context` **([string][4]? | [object][9])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1167
1189
|
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
1168
1190
|
|
|
1169
1191
|
### selectOption
|
|
@@ -1189,8 +1211,8 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
1189
1211
|
|
|
1190
1212
|
#### Parameters
|
|
1191
1213
|
|
|
1192
|
-
- `select` **([string][4] \| [object][
|
|
1193
|
-
- `option` **([string][4] \| [Array][
|
|
1214
|
+
- `select` **([string][4] \| [object][9])** field located by label|name|CSS|XPath|strict locator.
|
|
1215
|
+
- `option` **([string][4] \| [Array][7]<any>)** visible text or value of option.
|
|
1194
1216
|
⚠️ returns a _promise_ which is synchronized internally by recorderSupported only for web testing
|
|
1195
1217
|
|
|
1196
1218
|
### waitForElement
|
|
@@ -1205,8 +1227,8 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
1205
1227
|
|
|
1206
1228
|
#### Parameters
|
|
1207
1229
|
|
|
1208
|
-
- `locator` **([string][4] \| [object][
|
|
1209
|
-
- `sec` **[number][
|
|
1230
|
+
- `locator` **([string][4] \| [object][9])** element located by CSS|XPath|strict locator.
|
|
1231
|
+
- `sec` **[number][11]?** (optional, `1` by default) time in seconds to wait
|
|
1210
1232
|
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
1211
1233
|
|
|
1212
1234
|
### waitForVisible
|
|
@@ -1220,8 +1242,8 @@ I.waitForVisible('#popup');
|
|
|
1220
1242
|
|
|
1221
1243
|
#### Parameters
|
|
1222
1244
|
|
|
1223
|
-
- `locator` **([string][4] \| [object][
|
|
1224
|
-
- `sec` **[number][
|
|
1245
|
+
- `locator` **([string][4] \| [object][9])** element located by CSS|XPath|strict locator.
|
|
1246
|
+
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait
|
|
1225
1247
|
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `1`)
|
|
1226
1248
|
|
|
1227
1249
|
### waitForInvisible
|
|
@@ -1235,8 +1257,8 @@ I.waitForInvisible('#popup');
|
|
|
1235
1257
|
|
|
1236
1258
|
#### Parameters
|
|
1237
1259
|
|
|
1238
|
-
- `locator` **([string][4] \| [object][
|
|
1239
|
-
- `sec` **[number][
|
|
1260
|
+
- `locator` **([string][4] \| [object][9])** element located by CSS|XPath|strict locator.
|
|
1261
|
+
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait
|
|
1240
1262
|
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `1`)
|
|
1241
1263
|
|
|
1242
1264
|
### waitForText
|
|
@@ -1253,8 +1275,8 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
1253
1275
|
#### Parameters
|
|
1254
1276
|
|
|
1255
1277
|
- `text` **[string][4]** to wait for.
|
|
1256
|
-
- `sec` **[number][
|
|
1257
|
-
- `context` **([string][4] \| [object][
|
|
1278
|
+
- `sec` **[number][11]** (optional, `1` by default) time in seconds to wait (optional, default `1`)
|
|
1279
|
+
- `context` **([string][4] \| [object][9])?** (optional) element located by CSS|XPath|strict locator.
|
|
1258
1280
|
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
1259
1281
|
|
|
1260
1282
|
[1]: http://codecept.io/helpers/WebDriver/
|
|
@@ -1267,22 +1289,24 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
1267
1289
|
|
|
1268
1290
|
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
|
1269
1291
|
|
|
1270
|
-
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/
|
|
1292
|
+
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
1293
|
+
|
|
1294
|
+
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
1271
1295
|
|
|
1272
|
-
[
|
|
1296
|
+
[8]: http://webdriver.io/api/mobile/setNetworkConnection.html
|
|
1273
1297
|
|
|
1274
|
-
[
|
|
1298
|
+
[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
1275
1299
|
|
|
1276
|
-
[
|
|
1300
|
+
[10]: https://developer.android.com/reference/android/view/KeyEvent.html
|
|
1277
1301
|
|
|
1278
|
-
[
|
|
1302
|
+
[11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
1279
1303
|
|
|
1280
|
-
[
|
|
1304
|
+
[12]: http://webdriver.io/api/mobile/touchAction.html
|
|
1281
1305
|
|
|
1282
|
-
[
|
|
1306
|
+
[13]: http://webdriver.io/api/mobile/swipe.html
|
|
1283
1307
|
|
|
1284
|
-
[
|
|
1308
|
+
[14]: http://webdriver.io/api/mobile/rotate.html
|
|
1285
1309
|
|
|
1286
|
-
[
|
|
1310
|
+
[15]: http://webdriver.io/api/mobile/setImmediateValue.html
|
|
1287
1311
|
|
|
1288
|
-
[
|
|
1312
|
+
[16]: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
|
package/docs/helpers/GraphQL.md
CHANGED
|
@@ -93,9 +93,9 @@ I.sendMutation(`
|
|
|
93
93
|
#### Parameters
|
|
94
94
|
|
|
95
95
|
- `mutation` **[String][3]**
|
|
96
|
-
- `variables` **[object][2]
|
|
97
|
-
- `options` **[object][2]
|
|
98
|
-
- `headers` **[object][2]
|
|
96
|
+
- `variables` **[object][2]?** that may go along with the mutation
|
|
97
|
+
- `options` **[object][2]?** are additional query options
|
|
98
|
+
- `headers` **[object][2]?**
|
|
99
99
|
|
|
100
100
|
Returns **any** Promise<any>
|
|
101
101
|
|
|
@@ -117,9 +117,9 @@ const user = response.data.data;
|
|
|
117
117
|
#### Parameters
|
|
118
118
|
|
|
119
119
|
- `query` **[String][3]**
|
|
120
|
-
- `variables` **[object][2]
|
|
121
|
-
- `options` **[object][2]
|
|
122
|
-
- `headers` **[object][2]
|
|
120
|
+
- `variables` **[object][2]?** that may go along with the query
|
|
121
|
+
- `options` **[object][2]?** are additional query options
|
|
122
|
+
- `headers` **[object][2]?**
|
|
123
123
|
|
|
124
124
|
Returns **any** Promise<any>
|
|
125
125
|
|