codeceptjs 3.5.10 → 3.5.11
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 +36 -36
- package/docs/build/Expect.js +33 -33
- package/docs/build/Nightmare.js +50 -50
- package/docs/build/Playwright.js +126 -122
- package/docs/build/Protractor.js +59 -59
- package/docs/build/Puppeteer.js +93 -89
- package/docs/build/TestCafe.js +48 -48
- package/docs/build/WebDriver.js +90 -92
- package/docs/helpers/Appium.md +1 -1
- package/docs/helpers/Expect.md +33 -33
- package/docs/helpers/Playwright.md +73 -35
- package/docs/helpers/Puppeteer.md +35 -24
- package/docs/helpers/WebDriver.md +26 -13
- package/docs/parallel.md +2 -2
- package/docs/plugins.md +3 -3
- package/docs/react.md +2 -1
- package/docs/vue.md +22 -0
- package/docs/webapi/scrollIntoView.mustache +1 -1
- package/lib/command/workers/runTests.js +17 -1
- package/lib/helper/Expect.js +33 -33
- package/lib/helper/Playwright.js +28 -24
- package/lib/helper/Puppeteer.js +23 -19
- package/lib/helper/WebDriver.js +15 -17
- package/lib/helper/extras/PlaywrightReactVueLocator.js +38 -0
- package/lib/plugin/retryFailedStep.js +2 -2
- package/lib/plugin/tryTo.js +5 -4
- package/package.json +15 -15
- package/typings/index.d.ts +1 -1
- package/typings/promiseBasedTypes.d.ts +119 -74
- package/typings/types.d.ts +111 -143
- package/lib/helper/extras/PlaywrightReact.js +0 -9
package/docs/build/Nightmare.js
CHANGED
|
@@ -563,7 +563,7 @@ class Nightmare extends Helper {
|
|
|
563
563
|
* I.see('Register', {css: 'form.register'}); // use strict locator
|
|
564
564
|
* ```
|
|
565
565
|
* @param {string} text expected on page.
|
|
566
|
-
* @param {?
|
|
566
|
+
* @param {?string | object} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
567
567
|
* @returns {void} automatically synchronized promise through #recorder
|
|
568
568
|
*
|
|
569
569
|
*/
|
|
@@ -581,7 +581,7 @@ class Nightmare extends Helper {
|
|
|
581
581
|
* ```
|
|
582
582
|
*
|
|
583
583
|
* @param {string} text which is not present.
|
|
584
|
-
* @param {
|
|
584
|
+
* @param {string | object} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
585
585
|
* @returns {void} automatically synchronized promise through #recorder
|
|
586
586
|
*
|
|
587
587
|
*/
|
|
@@ -596,7 +596,7 @@ class Nightmare extends Helper {
|
|
|
596
596
|
* ```js
|
|
597
597
|
* I.seeElement('#modal');
|
|
598
598
|
* ```
|
|
599
|
-
* @param {
|
|
599
|
+
* @param {string | object} locator located by CSS|XPath|strict locator.
|
|
600
600
|
* @returns {void} automatically synchronized promise through #recorder
|
|
601
601
|
*
|
|
602
602
|
*/
|
|
@@ -615,7 +615,7 @@ class Nightmare extends Helper {
|
|
|
615
615
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
616
616
|
* ```
|
|
617
617
|
*
|
|
618
|
-
* @param {
|
|
618
|
+
* @param {string | object} locator located by CSS|XPath|Strict locator.
|
|
619
619
|
* @returns {void} automatically synchronized promise through #recorder
|
|
620
620
|
*
|
|
621
621
|
*/
|
|
@@ -635,7 +635,7 @@ class Nightmare extends Helper {
|
|
|
635
635
|
* ```js
|
|
636
636
|
* I.seeElementInDOM('#modal');
|
|
637
637
|
* ```
|
|
638
|
-
* @param {
|
|
638
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
639
639
|
* @returns {void} automatically synchronized promise through #recorder
|
|
640
640
|
*
|
|
641
641
|
*/
|
|
@@ -652,7 +652,7 @@ class Nightmare extends Helper {
|
|
|
652
652
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
653
653
|
* ```
|
|
654
654
|
*
|
|
655
|
-
* @param {
|
|
655
|
+
* @param {string | object} locator located by CSS|XPath|Strict locator.
|
|
656
656
|
* @returns {void} automatically synchronized promise through #recorder
|
|
657
657
|
*
|
|
658
658
|
*/
|
|
@@ -702,7 +702,7 @@ class Nightmare extends Helper {
|
|
|
702
702
|
* I.seeNumberOfElements('#submitBtn', 1);
|
|
703
703
|
* ```
|
|
704
704
|
*
|
|
705
|
-
* @param {
|
|
705
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
706
706
|
* @param {number} num number of elements.
|
|
707
707
|
* @returns {void} automatically synchronized promise through #recorder
|
|
708
708
|
*
|
|
@@ -720,7 +720,7 @@ class Nightmare extends Helper {
|
|
|
720
720
|
* I.seeNumberOfVisibleElements('.buttons', 3);
|
|
721
721
|
* ```
|
|
722
722
|
*
|
|
723
|
-
* @param {
|
|
723
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
724
724
|
* @param {number} num number of elements.
|
|
725
725
|
* @returns {void} automatically synchronized promise through #recorder
|
|
726
726
|
*
|
|
@@ -738,7 +738,7 @@ class Nightmare extends Helper {
|
|
|
738
738
|
* let numOfElements = await I.grabNumberOfVisibleElements('p');
|
|
739
739
|
* ```
|
|
740
740
|
*
|
|
741
|
-
* @param {
|
|
741
|
+
* @param {string | object} locator located by CSS|XPath|strict locator.
|
|
742
742
|
* @returns {Promise<number>} number of visible elements
|
|
743
743
|
*/
|
|
744
744
|
async grabNumberOfVisibleElements(locator) {
|
|
@@ -775,8 +775,8 @@ class Nightmare extends Helper {
|
|
|
775
775
|
* I.click({css: 'nav a.login'});
|
|
776
776
|
* ```
|
|
777
777
|
*
|
|
778
|
-
* @param {
|
|
779
|
-
* @param {?
|
|
778
|
+
* @param {string | object} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
779
|
+
* @param {?string | object | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
780
780
|
* @returns {void} automatically synchronized promise through #recorder
|
|
781
781
|
*
|
|
782
782
|
*/
|
|
@@ -798,8 +798,8 @@ class Nightmare extends Helper {
|
|
|
798
798
|
* I.doubleClick('.btn.edit');
|
|
799
799
|
* ```
|
|
800
800
|
*
|
|
801
|
-
* @param {
|
|
802
|
-
* @param {?
|
|
801
|
+
* @param {string | object} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
802
|
+
* @param {?string | object} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
803
803
|
* @returns {void} automatically synchronized promise through #recorder
|
|
804
804
|
*
|
|
805
805
|
*/
|
|
@@ -822,8 +822,8 @@ class Nightmare extends Helper {
|
|
|
822
822
|
* I.rightClick('Click me', '.context');
|
|
823
823
|
* ```
|
|
824
824
|
*
|
|
825
|
-
* @param {
|
|
826
|
-
* @param {?
|
|
825
|
+
* @param {string | object} locator clickable element located by CSS|XPath|strict locator.
|
|
826
|
+
* @param {?string | object} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
827
827
|
* @returns {void} automatically synchronized promise through #recorder
|
|
828
828
|
*
|
|
829
829
|
*/
|
|
@@ -843,7 +843,7 @@ class Nightmare extends Helper {
|
|
|
843
843
|
* I.moveCursorTo('#submit', 5,5);
|
|
844
844
|
* ```
|
|
845
845
|
*
|
|
846
|
-
* @param {
|
|
846
|
+
* @param {string | object} locator located by CSS|XPath|strict locator.
|
|
847
847
|
* @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
848
848
|
* @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
849
849
|
* @returns {void} automatically synchronized promise through #recorder
|
|
@@ -955,8 +955,8 @@ class Nightmare extends Helper {
|
|
|
955
955
|
* I.checkOption('I Agree to Terms and Conditions');
|
|
956
956
|
* I.checkOption('agree', '//form');
|
|
957
957
|
* ```
|
|
958
|
-
* @param {
|
|
959
|
-
* @param {?
|
|
958
|
+
* @param {string | object} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
959
|
+
* @param {?string | object} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
960
960
|
* @returns {void} automatically synchronized promise through #recorder
|
|
961
961
|
*
|
|
962
962
|
*/
|
|
@@ -978,8 +978,8 @@ class Nightmare extends Helper {
|
|
|
978
978
|
* I.uncheckOption('I Agree to Terms and Conditions');
|
|
979
979
|
* I.uncheckOption('agree', '//form');
|
|
980
980
|
* ```
|
|
981
|
-
* @param {
|
|
982
|
-
* @param {?
|
|
981
|
+
* @param {string | object} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
982
|
+
* @param {?string | object} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
983
983
|
* @returns {void} automatically synchronized promise through #recorder
|
|
984
984
|
*
|
|
985
985
|
*/
|
|
@@ -1004,8 +1004,8 @@ class Nightmare extends Helper {
|
|
|
1004
1004
|
* // or by strict locator
|
|
1005
1005
|
* I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
1006
1006
|
* ```
|
|
1007
|
-
* @param {
|
|
1008
|
-
* @param {
|
|
1007
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator.
|
|
1008
|
+
* @param {string | object} value text value to fill.
|
|
1009
1009
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1010
1010
|
*
|
|
1011
1011
|
*/
|
|
@@ -1024,7 +1024,7 @@ class Nightmare extends Helper {
|
|
|
1024
1024
|
* I.clearField('user[email]');
|
|
1025
1025
|
* I.clearField('#email');
|
|
1026
1026
|
* ```
|
|
1027
|
-
* @param {
|
|
1027
|
+
* @param {string | object} editable field located by label|name|CSS|XPath|strict locator.
|
|
1028
1028
|
* @returns {void} automatically synchronized promise through #recorder.
|
|
1029
1029
|
*
|
|
1030
1030
|
*/
|
|
@@ -1041,7 +1041,7 @@ class Nightmare extends Helper {
|
|
|
1041
1041
|
* // typing secret
|
|
1042
1042
|
* I.appendField('password', secret('123456'));
|
|
1043
1043
|
* ```
|
|
1044
|
-
* @param {
|
|
1044
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator
|
|
1045
1045
|
* @param {string} value text value to append.
|
|
1046
1046
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1047
1047
|
*
|
|
@@ -1063,8 +1063,8 @@ class Nightmare extends Helper {
|
|
|
1063
1063
|
* I.seeInField('form input[type=hidden]','hidden_value');
|
|
1064
1064
|
* I.seeInField('#searchform input','Search');
|
|
1065
1065
|
* ```
|
|
1066
|
-
* @param {
|
|
1067
|
-
* @param {
|
|
1066
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator.
|
|
1067
|
+
* @param {string | object} value value to check.
|
|
1068
1068
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1069
1069
|
*
|
|
1070
1070
|
*/
|
|
@@ -1082,8 +1082,8 @@ class Nightmare extends Helper {
|
|
|
1082
1082
|
* I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
1083
1083
|
* ```
|
|
1084
1084
|
*
|
|
1085
|
-
* @param {
|
|
1086
|
-
* @param {
|
|
1085
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator.
|
|
1086
|
+
* @param {string | object} value value to check.
|
|
1087
1087
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1088
1088
|
*
|
|
1089
1089
|
*/
|
|
@@ -1129,7 +1129,7 @@ class Nightmare extends Helper {
|
|
|
1129
1129
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
1130
1130
|
* ```
|
|
1131
1131
|
*
|
|
1132
|
-
* @param {
|
|
1132
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator.
|
|
1133
1133
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1134
1134
|
*
|
|
1135
1135
|
*/
|
|
@@ -1146,7 +1146,7 @@ class Nightmare extends Helper {
|
|
|
1146
1146
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
1147
1147
|
* ```
|
|
1148
1148
|
*
|
|
1149
|
-
* @param {
|
|
1149
|
+
* @param {string | object} field located by label|name|CSS|XPath|strict locator.
|
|
1150
1150
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1151
1151
|
*
|
|
1152
1152
|
*/
|
|
@@ -1164,7 +1164,7 @@ class Nightmare extends Helper {
|
|
|
1164
1164
|
* I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
1165
1165
|
* ```
|
|
1166
1166
|
*
|
|
1167
|
-
* @param {
|
|
1167
|
+
* @param {string | object} locator field located by label|name|CSS|XPath|strict locator.
|
|
1168
1168
|
* @param {string} pathToFile local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
1169
1169
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1170
1170
|
*
|
|
@@ -1193,7 +1193,7 @@ class Nightmare extends Helper {
|
|
|
1193
1193
|
* let pins = await I.grabTextFromAll('#pin li');
|
|
1194
1194
|
* ```
|
|
1195
1195
|
*
|
|
1196
|
-
* @param {
|
|
1196
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1197
1197
|
* @returns {Promise<string[]>} attribute value
|
|
1198
1198
|
*
|
|
1199
1199
|
*/
|
|
@@ -1217,7 +1217,7 @@ class Nightmare extends Helper {
|
|
|
1217
1217
|
* ```
|
|
1218
1218
|
* If multiple elements found returns first element.
|
|
1219
1219
|
*
|
|
1220
|
-
* @param {
|
|
1220
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1221
1221
|
* @returns {Promise<string>} attribute value
|
|
1222
1222
|
*
|
|
1223
1223
|
*/
|
|
@@ -1240,7 +1240,7 @@ class Nightmare extends Helper {
|
|
|
1240
1240
|
* ```js
|
|
1241
1241
|
* let inputs = await I.grabValueFromAll('//form/input');
|
|
1242
1242
|
* ```
|
|
1243
|
-
* @param {
|
|
1243
|
+
* @param {string | object} locator field located by label|name|CSS|XPath|strict locator.
|
|
1244
1244
|
* @returns {Promise<string[]>} attribute value
|
|
1245
1245
|
*
|
|
1246
1246
|
*/
|
|
@@ -1264,7 +1264,7 @@ class Nightmare extends Helper {
|
|
|
1264
1264
|
* ```js
|
|
1265
1265
|
* let email = await I.grabValueFrom('input[name=email]');
|
|
1266
1266
|
* ```
|
|
1267
|
-
* @param {
|
|
1267
|
+
* @param {string | object} locator field located by label|name|CSS|XPath|strict locator.
|
|
1268
1268
|
* @returns {Promise<string>} attribute value
|
|
1269
1269
|
*
|
|
1270
1270
|
*/
|
|
@@ -1286,7 +1286,7 @@ class Nightmare extends Helper {
|
|
|
1286
1286
|
* ```js
|
|
1287
1287
|
* let hints = await I.grabAttributeFromAll('.tooltip', 'title');
|
|
1288
1288
|
* ```
|
|
1289
|
-
* @param {
|
|
1289
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1290
1290
|
* @param {string} attr attribute name.
|
|
1291
1291
|
* @returns {Promise<string[]>} attribute value
|
|
1292
1292
|
*
|
|
@@ -1312,7 +1312,7 @@ class Nightmare extends Helper {
|
|
|
1312
1312
|
* ```js
|
|
1313
1313
|
* let hint = await I.grabAttributeFrom('#tooltip', 'title');
|
|
1314
1314
|
* ```
|
|
1315
|
-
* @param {
|
|
1315
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1316
1316
|
* @param {string} attr attribute name.
|
|
1317
1317
|
* @returns {Promise<string>} attribute value
|
|
1318
1318
|
*
|
|
@@ -1338,7 +1338,7 @@ class Nightmare extends Helper {
|
|
|
1338
1338
|
* let postHTMLs = await I.grabHTMLFromAll('.post');
|
|
1339
1339
|
* ```
|
|
1340
1340
|
*
|
|
1341
|
-
* @param {
|
|
1341
|
+
* @param {string | object} element located by CSS|XPath|strict locator.
|
|
1342
1342
|
* @returns {Promise<string[]>} HTML code for an element
|
|
1343
1343
|
*
|
|
1344
1344
|
*/
|
|
@@ -1365,7 +1365,7 @@ class Nightmare extends Helper {
|
|
|
1365
1365
|
* let postHTML = await I.grabHTMLFrom('#post');
|
|
1366
1366
|
* ```
|
|
1367
1367
|
*
|
|
1368
|
-
* @param {
|
|
1368
|
+
* @param {string | object} element located by CSS|XPath|strict locator.
|
|
1369
1369
|
* @returns {Promise<string>} HTML code for an element
|
|
1370
1370
|
*
|
|
1371
1371
|
*/
|
|
@@ -1390,7 +1390,7 @@ class Nightmare extends Helper {
|
|
|
1390
1390
|
* const value = await I.grabCssPropertyFrom('h3', 'font-weight');
|
|
1391
1391
|
* ```
|
|
1392
1392
|
*
|
|
1393
|
-
* @param {
|
|
1393
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1394
1394
|
* @param {string} cssProperty CSS property name.
|
|
1395
1395
|
* @returns {Promise<string>} CSS value
|
|
1396
1396
|
*
|
|
@@ -1439,7 +1439,7 @@ class Nightmare extends Helper {
|
|
|
1439
1439
|
* ```js
|
|
1440
1440
|
* I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
1441
1441
|
* ```
|
|
1442
|
-
* @param {
|
|
1442
|
+
* @param {string | object} select field located by label|name|CSS|XPath|strict locator.
|
|
1443
1443
|
* @param {string|Array<*>} option visible text or value of option.
|
|
1444
1444
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1445
1445
|
*
|
|
@@ -1645,7 +1645,7 @@ class Nightmare extends Helper {
|
|
|
1645
1645
|
*
|
|
1646
1646
|
* @param {string }text to wait for.
|
|
1647
1647
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1648
|
-
* @param {
|
|
1648
|
+
* @param {string | object} [context] (optional) element located by CSS|XPath|strict locator.
|
|
1649
1649
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1650
1650
|
*
|
|
1651
1651
|
*/
|
|
@@ -1674,7 +1674,7 @@ class Nightmare extends Helper {
|
|
|
1674
1674
|
* I.waitForVisible('#popup');
|
|
1675
1675
|
* ```
|
|
1676
1676
|
*
|
|
1677
|
-
* @param {
|
|
1677
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1678
1678
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1679
1679
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1680
1680
|
*
|
|
@@ -1702,7 +1702,7 @@ class Nightmare extends Helper {
|
|
|
1702
1702
|
* I.waitToHide('#popup');
|
|
1703
1703
|
* ```
|
|
1704
1704
|
*
|
|
1705
|
-
* @param {
|
|
1705
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1706
1706
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1707
1707
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1708
1708
|
*
|
|
@@ -1719,7 +1719,7 @@ class Nightmare extends Helper {
|
|
|
1719
1719
|
* I.waitForInvisible('#popup');
|
|
1720
1720
|
* ```
|
|
1721
1721
|
*
|
|
1722
|
-
* @param {
|
|
1722
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1723
1723
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1724
1724
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1725
1725
|
*
|
|
@@ -1748,7 +1748,7 @@ class Nightmare extends Helper {
|
|
|
1748
1748
|
* I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
1749
1749
|
* ```
|
|
1750
1750
|
*
|
|
1751
|
-
* @param {
|
|
1751
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1752
1752
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
1753
1753
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1754
1754
|
*
|
|
@@ -1779,7 +1779,7 @@ class Nightmare extends Helper {
|
|
|
1779
1779
|
* I.waitForDetached('#popup');
|
|
1780
1780
|
* ```
|
|
1781
1781
|
*
|
|
1782
|
-
* @param {
|
|
1782
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1783
1783
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1784
1784
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1785
1785
|
*
|
|
@@ -1825,7 +1825,7 @@ class Nightmare extends Helper {
|
|
|
1825
1825
|
* I.saveElementScreenshot(`#submit`,'debug.png');
|
|
1826
1826
|
* ```
|
|
1827
1827
|
*
|
|
1828
|
-
* @param {
|
|
1828
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1829
1829
|
* @param {string} fileName file name to save.
|
|
1830
1830
|
* @returns {void} automatically synchronized promise through #recorder
|
|
1831
1831
|
*
|
|
@@ -1866,7 +1866,7 @@ class Nightmare extends Helper {
|
|
|
1866
1866
|
* const width = await I.grabElementBoundingRect('h3', 'width');
|
|
1867
1867
|
* // width == 527
|
|
1868
1868
|
* ```
|
|
1869
|
-
* @param {
|
|
1869
|
+
* @param {string | object} locator element located by CSS|XPath|strict locator.
|
|
1870
1870
|
* @param {string=} elementSize x, y, width or height of the given element.
|
|
1871
1871
|
* @returns {Promise<DOMRect>|Promise<number>} Element bounding rectangle
|
|
1872
1872
|
*
|
|
@@ -1939,7 +1939,7 @@ class Nightmare extends Helper {
|
|
|
1939
1939
|
* I.scrollTo('#submit', 5, 5);
|
|
1940
1940
|
* ```
|
|
1941
1941
|
*
|
|
1942
|
-
* @param {
|
|
1942
|
+
* @param {string | object} locator located by CSS|XPath|strict locator.
|
|
1943
1943
|
* @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
1944
1944
|
* @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
1945
1945
|
* @returns {void} automatically synchronized promise through #recorder
|