codeceptjs 3.5.7 → 3.5.8
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/build/Appium.js +9 -4
- package/docs/build/Playwright.js +1 -0
- package/docs/changelog.md +9 -0
- package/docs/helpers/Appium.md +67 -65
- package/lib/helper/Appium.js +9 -4
- package/lib/helper/Playwright.js +1 -0
- package/package.json +5 -5
- package/typings/promiseBasedTypes.d.ts +5 -3
- package/typings/types.d.ts +5 -3
package/docs/build/Appium.js
CHANGED
|
@@ -183,7 +183,11 @@ class Appium extends Webdriver {
|
|
|
183
183
|
this.axios = axios.create();
|
|
184
184
|
|
|
185
185
|
webdriverio = require('webdriverio');
|
|
186
|
-
|
|
186
|
+
if (!config.appiumV2) {
|
|
187
|
+
console.log('The Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022. Please migrating to Appium 2.x by adding appiumV2: true to your config.');
|
|
188
|
+
console.log('More info: https://bit.ly/appium-v2-migration');
|
|
189
|
+
console.log('This Appium 1.x support will be removed in next major release.');
|
|
190
|
+
}
|
|
187
191
|
}
|
|
188
192
|
|
|
189
193
|
_validateConfig(config) {
|
|
@@ -917,11 +921,12 @@ class Appium extends Webdriver {
|
|
|
917
921
|
* I.setNetworkConnection(4) // airplane mode off, wifi off, data on
|
|
918
922
|
* I.setNetworkConnection(6) // airplane mode off, wifi on, data on
|
|
919
923
|
* ```
|
|
920
|
-
* See corresponding [webdriverio reference](
|
|
921
|
-
*
|
|
922
|
-
* @return {Promise<{}>}
|
|
924
|
+
* See corresponding [webdriverio reference](https://webdriver.io/docs/api/chromium/#setnetworkconnection).
|
|
923
925
|
*
|
|
924
926
|
* Appium: support only Android
|
|
927
|
+
*
|
|
928
|
+
* @param {number} value The network connection mode bitmask
|
|
929
|
+
* @return {Promise<number>}
|
|
925
930
|
*/
|
|
926
931
|
async setNetworkConnection(value) {
|
|
927
932
|
onlyForApps.call(this, supportedPlatform.android);
|
package/docs/build/Playwright.js
CHANGED
|
@@ -3522,6 +3522,7 @@ class Playwright extends Helper {
|
|
|
3522
3522
|
let count = 0;
|
|
3523
3523
|
do {
|
|
3524
3524
|
waiter = await _contextObject.locator(`:has-text('${text}')`).first().isVisible();
|
|
3525
|
+
if (waiter) break;
|
|
3525
3526
|
await this.wait(1);
|
|
3526
3527
|
count += 1000;
|
|
3527
3528
|
} while (count <= waitTimeout);
|
package/docs/changelog.md
CHANGED
|
@@ -7,6 +7,15 @@ layout: Section
|
|
|
7
7
|
|
|
8
8
|
# Releases
|
|
9
9
|
|
|
10
|
+
## 3.5.8
|
|
11
|
+
|
|
12
|
+
Thanks all to those who contributed to make this release!
|
|
13
|
+
|
|
14
|
+
🐛 *Bug Fixes*
|
|
15
|
+
fix(appium): type of setNetworkConnection() ([#3994](https://github.com/codeceptjs/CodeceptJS/issues/3994)) - by **[mirao](https://github.com/mirao)**
|
|
16
|
+
fix: improve the way to show deprecated appium v1 message ([#3992](https://github.com/codeceptjs/CodeceptJS/issues/3992)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
|
|
17
|
+
fix: missing exit condition of some wait functions - by **[kobenguyent](https://github.com/kobenguyent)**
|
|
18
|
+
|
|
10
19
|
## 3.5.7
|
|
11
20
|
|
|
12
21
|
Thanks all to those who contributed to make this release!
|
package/docs/helpers/Appium.md
CHANGED
|
@@ -520,11 +520,13 @@ I.setNetworkConnection(6) // airplane mode off, wifi on, data on
|
|
|
520
520
|
|
|
521
521
|
See corresponding [webdriverio reference][9].
|
|
522
522
|
|
|
523
|
+
Appium: support only Android
|
|
524
|
+
|
|
523
525
|
#### Parameters
|
|
524
526
|
|
|
525
|
-
- `value`
|
|
527
|
+
- `value` **[number][10]** The network connection mode bitmask
|
|
526
528
|
|
|
527
|
-
Returns **[Promise][6]<
|
|
529
|
+
Returns **[Promise][6]<[number][10]>**
|
|
528
530
|
|
|
529
531
|
### setSettings
|
|
530
532
|
|
|
@@ -536,7 +538,7 @@ I.setSettings({cyberdelia: 'open'});
|
|
|
536
538
|
|
|
537
539
|
#### Parameters
|
|
538
540
|
|
|
539
|
-
- `settings` **[object][
|
|
541
|
+
- `settings` **[object][11]** objectAppium: support Android and iOS
|
|
540
542
|
|
|
541
543
|
### hideDeviceKeyboard
|
|
542
544
|
|
|
@@ -561,7 +563,7 @@ Appium: support Android and iOS
|
|
|
561
563
|
### sendDeviceKeyEvent
|
|
562
564
|
|
|
563
565
|
Send a key event to the device.
|
|
564
|
-
List of keys: [https://developer.android.com/reference/android/view/KeyEvent.html][
|
|
566
|
+
List of keys: [https://developer.android.com/reference/android/view/KeyEvent.html][12]
|
|
565
567
|
|
|
566
568
|
```js
|
|
567
569
|
I.sendDeviceKeyEvent(3);
|
|
@@ -569,7 +571,7 @@ I.sendDeviceKeyEvent(3);
|
|
|
569
571
|
|
|
570
572
|
#### Parameters
|
|
571
573
|
|
|
572
|
-
- `keyValue` **[number][
|
|
574
|
+
- `keyValue` **[number][10]** Device specific key value
|
|
573
575
|
|
|
574
576
|
Returns **[Promise][6]<void>** Appium: support only Android
|
|
575
577
|
|
|
@@ -631,10 +633,10 @@ I.swipe(locator, 800, 1200, 1000);
|
|
|
631
633
|
|
|
632
634
|
#### Parameters
|
|
633
635
|
|
|
634
|
-
- `locator` **([string][5] \| [object][
|
|
635
|
-
- `xoffset` **[number][
|
|
636
|
-
- `yoffset` **[number][
|
|
637
|
-
- `speed` **[number][
|
|
636
|
+
- `locator` **([string][5] \| [object][11])**
|
|
637
|
+
- `xoffset` **[number][10]**
|
|
638
|
+
- `yoffset` **[number][10]**
|
|
639
|
+
- `speed` **[number][10]** (optional), 1000 by default (optional, default `1000`)
|
|
638
640
|
|
|
639
641
|
Returns **[Promise][6]<void>** Appium: support Android and iOS
|
|
640
642
|
|
|
@@ -648,8 +650,8 @@ I.performSwipe({ x: 300, y: 100 }, { x: 200, y: 100 });
|
|
|
648
650
|
|
|
649
651
|
#### Parameters
|
|
650
652
|
|
|
651
|
-
- `from` **[object][
|
|
652
|
-
- `to` **[object][
|
|
653
|
+
- `from` **[object][11]**
|
|
654
|
+
- `to` **[object][11]** Appium: support Android and iOS
|
|
653
655
|
|
|
654
656
|
### swipeDown
|
|
655
657
|
|
|
@@ -664,9 +666,9 @@ I.swipeDown(locator, 1200, 1000); // set offset and speed
|
|
|
664
666
|
|
|
665
667
|
#### Parameters
|
|
666
668
|
|
|
667
|
-
- `locator` **([string][5] \| [object][
|
|
668
|
-
- `yoffset` **[number][
|
|
669
|
-
- `speed` **[number][
|
|
669
|
+
- `locator` **([string][5] \| [object][11])**
|
|
670
|
+
- `yoffset` **[number][10]?** (optional) (optional, default `1000`)
|
|
671
|
+
- `speed` **[number][10]** (optional), 1000 by default (optional, default `1000`)
|
|
670
672
|
|
|
671
673
|
Returns **[Promise][6]<void>** Appium: support Android and iOS
|
|
672
674
|
|
|
@@ -683,9 +685,9 @@ I.swipeLeft(locator, 1200, 1000); // set offset and speed
|
|
|
683
685
|
|
|
684
686
|
#### Parameters
|
|
685
687
|
|
|
686
|
-
- `locator` **([string][5] \| [object][
|
|
687
|
-
- `xoffset` **[number][
|
|
688
|
-
- `speed` **[number][
|
|
688
|
+
- `locator` **([string][5] \| [object][11])**
|
|
689
|
+
- `xoffset` **[number][10]?** (optional) (optional, default `1000`)
|
|
690
|
+
- `speed` **[number][10]** (optional), 1000 by default (optional, default `1000`)
|
|
689
691
|
|
|
690
692
|
Returns **[Promise][6]<void>** Appium: support Android and iOS
|
|
691
693
|
|
|
@@ -702,9 +704,9 @@ I.swipeRight(locator, 1200, 1000); // set offset and speed
|
|
|
702
704
|
|
|
703
705
|
#### Parameters
|
|
704
706
|
|
|
705
|
-
- `locator` **([string][5] \| [object][
|
|
706
|
-
- `xoffset` **[number][
|
|
707
|
-
- `speed` **[number][
|
|
707
|
+
- `locator` **([string][5] \| [object][11])**
|
|
708
|
+
- `xoffset` **[number][10]?** (optional) (optional, default `1000`)
|
|
709
|
+
- `speed` **[number][10]** (optional), 1000 by default (optional, default `1000`)
|
|
708
710
|
|
|
709
711
|
Returns **[Promise][6]<void>** Appium: support Android and iOS
|
|
710
712
|
|
|
@@ -721,9 +723,9 @@ I.swipeUp(locator, 1200, 1000); // set offset and speed
|
|
|
721
723
|
|
|
722
724
|
#### Parameters
|
|
723
725
|
|
|
724
|
-
- `locator` **([string][5] \| [object][
|
|
725
|
-
- `yoffset` **[number][
|
|
726
|
-
- `speed` **[number][
|
|
726
|
+
- `locator` **([string][5] \| [object][11])**
|
|
727
|
+
- `yoffset` **[number][10]?** (optional) (optional, default `1000`)
|
|
728
|
+
- `speed` **[number][10]** (optional), 1000 by default (optional, default `1000`)
|
|
727
729
|
|
|
728
730
|
Returns **[Promise][6]<void>** Appium: support Android and iOS
|
|
729
731
|
|
|
@@ -746,9 +748,9 @@ I.swipeTo(
|
|
|
746
748
|
- `searchableLocator` **[string][5]**
|
|
747
749
|
- `scrollLocator` **[string][5]**
|
|
748
750
|
- `direction` **[string][5]**
|
|
749
|
-
- `timeout` **[number][
|
|
750
|
-
- `offset` **[number][
|
|
751
|
-
- `speed` **[number][
|
|
751
|
+
- `timeout` **[number][10]**
|
|
752
|
+
- `offset` **[number][10]**
|
|
753
|
+
- `speed` **[number][10]**
|
|
752
754
|
|
|
753
755
|
Returns **[Promise][6]<void>** Appium: support Android and iOS
|
|
754
756
|
|
|
@@ -884,7 +886,7 @@ I.appendField('password', secret('123456'));
|
|
|
884
886
|
|
|
885
887
|
#### Parameters
|
|
886
888
|
|
|
887
|
-
- `field` **([string][5] \| [object][
|
|
889
|
+
- `field` **([string][5] \| [object][11])** located by label|name|CSS|XPath|strict locator
|
|
888
890
|
- `value` **[string][5]** text value to append.
|
|
889
891
|
|
|
890
892
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
@@ -904,8 +906,8 @@ I.checkOption('agree', '//form');
|
|
|
904
906
|
|
|
905
907
|
#### Parameters
|
|
906
908
|
|
|
907
|
-
- `field` **([string][5] \| [object][
|
|
908
|
-
- `context` **([string][5]? | [object][
|
|
909
|
+
- `field` **([string][5] \| [object][11])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
910
|
+
- `context` **([string][5]? | [object][11])** (optional, `null` by default) element located by CSS | XPath | strict locator. (optional, default `null`)
|
|
909
911
|
|
|
910
912
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
911
913
|
|
|
@@ -935,8 +937,8 @@ I.click({css: 'nav a.login'});
|
|
|
935
937
|
|
|
936
938
|
#### Parameters
|
|
937
939
|
|
|
938
|
-
- `locator` **([string][5] \| [object][
|
|
939
|
-
- `context` **([string][5]? | [object][
|
|
940
|
+
- `locator` **([string][5] \| [object][11])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
941
|
+
- `context` **([string][5]? | [object][11] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator. (optional, default `null`)
|
|
940
942
|
|
|
941
943
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
942
944
|
|
|
@@ -952,7 +954,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
952
954
|
|
|
953
955
|
#### Parameters
|
|
954
956
|
|
|
955
|
-
- `field` **([string][5] \| [object][
|
|
957
|
+
- `field` **([string][5] \| [object][11])** located by label|name|CSS|XPath|strict locator.
|
|
956
958
|
|
|
957
959
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
958
960
|
|
|
@@ -966,7 +968,7 @@ I.dontSeeElement('.modal'); // modal is not shown
|
|
|
966
968
|
|
|
967
969
|
#### Parameters
|
|
968
970
|
|
|
969
|
-
- `locator` **([string][5] \| [object][
|
|
971
|
+
- `locator` **([string][5] \| [object][11])** located by CSS|XPath|Strict locator.
|
|
970
972
|
|
|
971
973
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
972
974
|
|
|
@@ -982,8 +984,8 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
|
982
984
|
|
|
983
985
|
#### Parameters
|
|
984
986
|
|
|
985
|
-
- `field` **([string][5] \| [object][
|
|
986
|
-
- `value` **([string][5] \| [object][
|
|
987
|
+
- `field` **([string][5] \| [object][11])** located by label|name|CSS|XPath|strict locator.
|
|
988
|
+
- `value` **([string][5] \| [object][11])** value to check.
|
|
987
989
|
|
|
988
990
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
989
991
|
|
|
@@ -1000,7 +1002,7 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
1000
1002
|
#### Parameters
|
|
1001
1003
|
|
|
1002
1004
|
- `text` **[string][5]** which is not present.
|
|
1003
|
-
- `context` **([string][5] \| [object][
|
|
1005
|
+
- `context` **([string][5] \| [object][11])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search. (optional, default `null`)
|
|
1004
1006
|
|
|
1005
1007
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
1006
1008
|
|
|
@@ -1022,8 +1024,8 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
|
1022
1024
|
|
|
1023
1025
|
#### Parameters
|
|
1024
1026
|
|
|
1025
|
-
- `field` **([string][5] \| [object][
|
|
1026
|
-
- `value` **([string][5] \| [object][
|
|
1027
|
+
- `field` **([string][5] \| [object][11])** located by label|name|CSS|XPath|strict locator.
|
|
1028
|
+
- `value` **([string][5] \| [object][11])** text value to fill.
|
|
1027
1029
|
|
|
1028
1030
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
1029
1031
|
|
|
@@ -1038,7 +1040,7 @@ let pins = await I.grabTextFromAll('#pin li');
|
|
|
1038
1040
|
|
|
1039
1041
|
#### Parameters
|
|
1040
1042
|
|
|
1041
|
-
- `locator` **([string][5] \| [object][
|
|
1043
|
+
- `locator` **([string][5] \| [object][11])** element located by CSS|XPath|strict locator.
|
|
1042
1044
|
|
|
1043
1045
|
Returns **[Promise][6]<[Array][8]<[string][5]>>** attribute value
|
|
1044
1046
|
|
|
@@ -1055,7 +1057,7 @@ If multiple elements found returns first element.
|
|
|
1055
1057
|
|
|
1056
1058
|
#### Parameters
|
|
1057
1059
|
|
|
1058
|
-
- `locator` **([string][5] \| [object][
|
|
1060
|
+
- `locator` **([string][5] \| [object][11])** element located by CSS|XPath|strict locator.
|
|
1059
1061
|
|
|
1060
1062
|
Returns **[Promise][6]<[string][5]>** attribute value
|
|
1061
1063
|
|
|
@@ -1070,9 +1072,9 @@ let numOfElements = await I.grabNumberOfVisibleElements('p');
|
|
|
1070
1072
|
|
|
1071
1073
|
#### Parameters
|
|
1072
1074
|
|
|
1073
|
-
- `locator` **([string][5] \| [object][
|
|
1075
|
+
- `locator` **([string][5] \| [object][11])** located by CSS|XPath|strict locator.
|
|
1074
1076
|
|
|
1075
|
-
Returns **[Promise][6]<[number][
|
|
1077
|
+
Returns **[Promise][6]<[number][10]>** number of visible elements
|
|
1076
1078
|
|
|
1077
1079
|
### grabAttributeFrom
|
|
1078
1080
|
|
|
@@ -1088,7 +1090,7 @@ let hint = await I.grabAttributeFrom('#tooltip', 'title');
|
|
|
1088
1090
|
|
|
1089
1091
|
#### Parameters
|
|
1090
1092
|
|
|
1091
|
-
- `locator` **([string][5] \| [object][
|
|
1093
|
+
- `locator` **([string][5] \| [object][11])** element located by CSS|XPath|strict locator.
|
|
1092
1094
|
- `attr` **[string][5]** attribute name.
|
|
1093
1095
|
|
|
1094
1096
|
Returns **[Promise][6]<[string][5]>** attribute value
|
|
@@ -1105,7 +1107,7 @@ let hints = await I.grabAttributeFromAll('.tooltip', 'title');
|
|
|
1105
1107
|
|
|
1106
1108
|
#### Parameters
|
|
1107
1109
|
|
|
1108
|
-
- `locator` **([string][5] \| [object][
|
|
1110
|
+
- `locator` **([string][5] \| [object][11])** element located by CSS|XPath|strict locator.
|
|
1109
1111
|
- `attr` **[string][5]** attribute name.
|
|
1110
1112
|
|
|
1111
1113
|
Returns **[Promise][6]<[Array][8]<[string][5]>>** attribute value
|
|
@@ -1121,7 +1123,7 @@ let inputs = await I.grabValueFromAll('//form/input');
|
|
|
1121
1123
|
|
|
1122
1124
|
#### Parameters
|
|
1123
1125
|
|
|
1124
|
-
- `locator` **([string][5] \| [object][
|
|
1126
|
+
- `locator` **([string][5] \| [object][11])** field located by label|name|CSS|XPath|strict locator.
|
|
1125
1127
|
|
|
1126
1128
|
Returns **[Promise][6]<[Array][8]<[string][5]>>** attribute value
|
|
1127
1129
|
|
|
@@ -1137,7 +1139,7 @@ let email = await I.grabValueFrom('input[name=email]');
|
|
|
1137
1139
|
|
|
1138
1140
|
#### Parameters
|
|
1139
1141
|
|
|
1140
|
-
- `locator` **([string][5] \| [object][
|
|
1142
|
+
- `locator` **([string][5] \| [object][11])** field located by label|name|CSS|XPath|strict locator.
|
|
1141
1143
|
|
|
1142
1144
|
Returns **[Promise][6]<[string][5]>** attribute value
|
|
1143
1145
|
|
|
@@ -1168,7 +1170,7 @@ I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "cent
|
|
|
1168
1170
|
|
|
1169
1171
|
#### Parameters
|
|
1170
1172
|
|
|
1171
|
-
- `locator` **([string][5] \| [object][
|
|
1173
|
+
- `locator` **([string][5] \| [object][11])** located by CSS|XPath|strict locator.
|
|
1172
1174
|
- `scrollIntoViewOptions` **ScrollIntoViewOptions** see [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][17].
|
|
1173
1175
|
|
|
1174
1176
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorderSupported only for web testing
|
|
@@ -1185,7 +1187,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
1185
1187
|
|
|
1186
1188
|
#### Parameters
|
|
1187
1189
|
|
|
1188
|
-
- `field` **([string][5] \| [object][
|
|
1190
|
+
- `field` **([string][5] \| [object][11])** located by label|name|CSS|XPath|strict locator.
|
|
1189
1191
|
|
|
1190
1192
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
1191
1193
|
|
|
@@ -1200,7 +1202,7 @@ I.seeElement('#modal');
|
|
|
1200
1202
|
|
|
1201
1203
|
#### Parameters
|
|
1202
1204
|
|
|
1203
|
-
- `locator` **([string][5] \| [object][
|
|
1205
|
+
- `locator` **([string][5] \| [object][11])** located by CSS|XPath|strict locator.
|
|
1204
1206
|
|
|
1205
1207
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
1206
1208
|
|
|
@@ -1218,8 +1220,8 @@ I.seeInField('#searchform input','Search');
|
|
|
1218
1220
|
|
|
1219
1221
|
#### Parameters
|
|
1220
1222
|
|
|
1221
|
-
- `field` **([string][5] \| [object][
|
|
1222
|
-
- `value` **([string][5] \| [object][
|
|
1223
|
+
- `field` **([string][5] \| [object][11])** located by label|name|CSS|XPath|strict locator.
|
|
1224
|
+
- `value` **([string][5] \| [object][11])** value to check.
|
|
1223
1225
|
|
|
1224
1226
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
1225
1227
|
|
|
@@ -1237,7 +1239,7 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
1237
1239
|
#### Parameters
|
|
1238
1240
|
|
|
1239
1241
|
- `text` **[string][5]** expected on page.
|
|
1240
|
-
- `context` **([string][5]? | [object][
|
|
1242
|
+
- `context` **([string][5]? | [object][11])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text. (optional, default `null`)
|
|
1241
1243
|
|
|
1242
1244
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
1243
1245
|
|
|
@@ -1264,7 +1266,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
1264
1266
|
|
|
1265
1267
|
#### Parameters
|
|
1266
1268
|
|
|
1267
|
-
- `select` **([string][5] \| [object][
|
|
1269
|
+
- `select` **([string][5] \| [object][11])** field located by label|name|CSS|XPath|strict locator.
|
|
1268
1270
|
- `option` **([string][5] \| [Array][8]<any>)** visible text or value of option.
|
|
1269
1271
|
|
|
1270
1272
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorderSupported only for web testing
|
|
@@ -1281,8 +1283,8 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
1281
1283
|
|
|
1282
1284
|
#### Parameters
|
|
1283
1285
|
|
|
1284
|
-
- `locator` **([string][5] \| [object][
|
|
1285
|
-
- `sec` **[number][
|
|
1286
|
+
- `locator` **([string][5] \| [object][11])** element located by CSS|XPath|strict locator.
|
|
1287
|
+
- `sec` **[number][10]?** (optional, `1` by default) time in seconds to wait (optional, default `null`)
|
|
1286
1288
|
|
|
1287
1289
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
1288
1290
|
|
|
@@ -1297,8 +1299,8 @@ I.waitForVisible('#popup');
|
|
|
1297
1299
|
|
|
1298
1300
|
#### Parameters
|
|
1299
1301
|
|
|
1300
|
-
- `locator` **([string][5] \| [object][
|
|
1301
|
-
- `sec` **[number][
|
|
1302
|
+
- `locator` **([string][5] \| [object][11])** element located by CSS|XPath|strict locator.
|
|
1303
|
+
- `sec` **[number][10]** (optional, `1` by default) time in seconds to wait (optional, default `1`)
|
|
1302
1304
|
|
|
1303
1305
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
1304
1306
|
|
|
@@ -1313,8 +1315,8 @@ I.waitForInvisible('#popup');
|
|
|
1313
1315
|
|
|
1314
1316
|
#### Parameters
|
|
1315
1317
|
|
|
1316
|
-
- `locator` **([string][5] \| [object][
|
|
1317
|
-
- `sec` **[number][
|
|
1318
|
+
- `locator` **([string][5] \| [object][11])** element located by CSS|XPath|strict locator.
|
|
1319
|
+
- `sec` **[number][10]** (optional, `1` by default) time in seconds to wait (optional, default `1`)
|
|
1318
1320
|
|
|
1319
1321
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
1320
1322
|
|
|
@@ -1332,8 +1334,8 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
1332
1334
|
#### Parameters
|
|
1333
1335
|
|
|
1334
1336
|
- `text` **[string][5]** to wait for.
|
|
1335
|
-
- `sec` **[number][
|
|
1336
|
-
- `context` **([string][5] \| [object][
|
|
1337
|
+
- `sec` **[number][10]** (optional, `1` by default) time in seconds to wait (optional, default `1`)
|
|
1338
|
+
- `context` **([string][5] \| [object][11])?** (optional) element located by CSS|XPath|strict locator. (optional, default `null`)
|
|
1337
1339
|
|
|
1338
1340
|
Returns **[Promise][6]<void>** automatically synchronized promise through #recorder
|
|
1339
1341
|
|
|
@@ -1353,13 +1355,13 @@ Returns **[Promise][6]<void>** automatically synchronized promise through #re
|
|
|
1353
1355
|
|
|
1354
1356
|
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
1355
1357
|
|
|
1356
|
-
[9]:
|
|
1358
|
+
[9]: https://webdriver.io/docs/api/chromium/#setnetworkconnection
|
|
1357
1359
|
|
|
1358
|
-
[10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/
|
|
1360
|
+
[10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
1359
1361
|
|
|
1360
|
-
[11]: https://developer.
|
|
1362
|
+
[11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
1361
1363
|
|
|
1362
|
-
[12]: https://developer.
|
|
1364
|
+
[12]: https://developer.android.com/reference/android/view/KeyEvent.html
|
|
1363
1365
|
|
|
1364
1366
|
[13]: http://webdriver.io/api/mobile/touchAction.html
|
|
1365
1367
|
|
package/lib/helper/Appium.js
CHANGED
|
@@ -183,7 +183,11 @@ class Appium extends Webdriver {
|
|
|
183
183
|
this.axios = axios.create();
|
|
184
184
|
|
|
185
185
|
webdriverio = require('webdriverio');
|
|
186
|
-
|
|
186
|
+
if (!config.appiumV2) {
|
|
187
|
+
console.log('The Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022. Please migrating to Appium 2.x by adding appiumV2: true to your config.');
|
|
188
|
+
console.log('More info: https://bit.ly/appium-v2-migration');
|
|
189
|
+
console.log('This Appium 1.x support will be removed in next major release.');
|
|
190
|
+
}
|
|
187
191
|
}
|
|
188
192
|
|
|
189
193
|
_validateConfig(config) {
|
|
@@ -917,11 +921,12 @@ class Appium extends Webdriver {
|
|
|
917
921
|
* I.setNetworkConnection(4) // airplane mode off, wifi off, data on
|
|
918
922
|
* I.setNetworkConnection(6) // airplane mode off, wifi on, data on
|
|
919
923
|
* ```
|
|
920
|
-
* See corresponding [webdriverio reference](
|
|
921
|
-
*
|
|
922
|
-
* @return {Promise<{}>}
|
|
924
|
+
* See corresponding [webdriverio reference](https://webdriver.io/docs/api/chromium/#setnetworkconnection).
|
|
923
925
|
*
|
|
924
926
|
* Appium: support only Android
|
|
927
|
+
*
|
|
928
|
+
* @param {number} value The network connection mode bitmask
|
|
929
|
+
* @return {Promise<number>}
|
|
925
930
|
*/
|
|
926
931
|
async setNetworkConnection(value) {
|
|
927
932
|
onlyForApps.call(this, supportedPlatform.android);
|
package/lib/helper/Playwright.js
CHANGED
|
@@ -2582,6 +2582,7 @@ class Playwright extends Helper {
|
|
|
2582
2582
|
let count = 0;
|
|
2583
2583
|
do {
|
|
2584
2584
|
waiter = await _contextObject.locator(`:has-text('${text}')`).first().isVisible();
|
|
2585
|
+
if (waiter) break;
|
|
2585
2586
|
await this.wait(1);
|
|
2586
2587
|
count += 1000;
|
|
2587
2588
|
} while (count <= waitTimeout);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.8",
|
|
4
4
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acceptance",
|
|
@@ -123,18 +123,18 @@
|
|
|
123
123
|
"chai-subset": "1.6.0",
|
|
124
124
|
"contributor-faces": "1.1.0",
|
|
125
125
|
"documentation": "12.3.0",
|
|
126
|
-
"dtslint": "4.1
|
|
127
|
-
"electron": "27.0.
|
|
126
|
+
"dtslint": "4.2.1",
|
|
127
|
+
"electron": "27.0.4",
|
|
128
128
|
"eslint": "8.53.0",
|
|
129
129
|
"eslint-config-airbnb-base": "15.0.0",
|
|
130
130
|
"eslint-plugin-import": "2.29.0",
|
|
131
131
|
"eslint-plugin-mocha": "6.3.0",
|
|
132
132
|
"expect": "29.7.0",
|
|
133
|
-
"express": "4.
|
|
133
|
+
"express": "4.18.2",
|
|
134
134
|
"graphql": "14.6.0",
|
|
135
135
|
"husky": "8.0.3",
|
|
136
136
|
"inquirer-test": "2.0.1",
|
|
137
|
-
"jsdoc": "3.6.
|
|
137
|
+
"jsdoc": "3.6.11",
|
|
138
138
|
"jsdoc-typeof-plugin": "1.0.0",
|
|
139
139
|
"json-server": "0.10.1",
|
|
140
140
|
"playwright": "1.39.0",
|
|
@@ -508,10 +508,12 @@ declare namespace CodeceptJS {
|
|
|
508
508
|
* I.setNetworkConnection(4) // airplane mode off, wifi off, data on
|
|
509
509
|
* I.setNetworkConnection(6) // airplane mode off, wifi on, data on
|
|
510
510
|
* ```
|
|
511
|
-
* See corresponding [webdriverio reference](
|
|
512
|
-
*
|
|
511
|
+
* See corresponding [webdriverio reference](https://webdriver.io/docs/api/chromium/#setnetworkconnection).
|
|
512
|
+
*
|
|
513
|
+
* Appium: support only Android
|
|
514
|
+
* @param value - The network connection mode bitmask
|
|
513
515
|
*/
|
|
514
|
-
setNetworkConnection(): Promise<
|
|
516
|
+
setNetworkConnection(value: number): Promise<number>;
|
|
515
517
|
/**
|
|
516
518
|
* Update the current setting on the device
|
|
517
519
|
*
|
package/typings/types.d.ts
CHANGED
|
@@ -508,10 +508,12 @@ declare namespace CodeceptJS {
|
|
|
508
508
|
* I.setNetworkConnection(4) // airplane mode off, wifi off, data on
|
|
509
509
|
* I.setNetworkConnection(6) // airplane mode off, wifi on, data on
|
|
510
510
|
* ```
|
|
511
|
-
* See corresponding [webdriverio reference](
|
|
512
|
-
*
|
|
511
|
+
* See corresponding [webdriverio reference](https://webdriver.io/docs/api/chromium/#setnetworkconnection).
|
|
512
|
+
*
|
|
513
|
+
* Appium: support only Android
|
|
514
|
+
* @param value - The network connection mode bitmask
|
|
513
515
|
*/
|
|
514
|
-
setNetworkConnection(): Promise<
|
|
516
|
+
setNetworkConnection(value: number): Promise<number>;
|
|
515
517
|
/**
|
|
516
518
|
* Update the current setting on the device
|
|
517
519
|
*
|