codeceptjs 3.5.9 → 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.
Files changed (52) hide show
  1. package/README.md +14 -16
  2. package/docs/build/Appium.js +49 -49
  3. package/docs/build/Expect.js +33 -33
  4. package/docs/build/Nightmare.js +50 -50
  5. package/docs/build/Playwright.js +239 -133
  6. package/docs/build/Protractor.js +59 -59
  7. package/docs/build/Puppeteer.js +127 -107
  8. package/docs/build/TestCafe.js +48 -48
  9. package/docs/build/WebDriver.js +112 -93
  10. package/docs/helpers/Appium.md +3 -3
  11. package/docs/helpers/Expect.md +33 -33
  12. package/docs/helpers/Playwright.md +431 -325
  13. package/docs/helpers/Puppeteer.md +50 -24
  14. package/docs/helpers/WebDriver.md +41 -13
  15. package/docs/internal-api.md +1 -0
  16. package/docs/parallel.md +114 -2
  17. package/docs/plugins.md +7 -5
  18. package/docs/react.md +2 -1
  19. package/docs/vue.md +22 -0
  20. package/docs/webapi/grabWebElement.mustache +9 -0
  21. package/docs/webapi/grabWebElements.mustache +9 -0
  22. package/docs/webapi/scrollIntoView.mustache +1 -1
  23. package/lib/ai.js +12 -3
  24. package/lib/colorUtils.js +10 -0
  25. package/lib/command/run-multiple.js +1 -1
  26. package/lib/command/run-workers.js +30 -4
  27. package/lib/command/workers/runTests.js +39 -0
  28. package/lib/event.js +2 -0
  29. package/lib/helper/Appium.js +13 -13
  30. package/lib/helper/Expect.js +33 -33
  31. package/lib/helper/Playwright.js +125 -37
  32. package/lib/helper/Puppeteer.js +49 -38
  33. package/lib/helper/WebDriver.js +29 -19
  34. package/lib/helper/extras/PlaywrightReactVueLocator.js +38 -0
  35. package/lib/html.js +3 -3
  36. package/lib/interfaces/gherkin.js +8 -1
  37. package/lib/interfaces/scenarioConfig.js +1 -0
  38. package/lib/locator.js +2 -2
  39. package/lib/pause.js +6 -3
  40. package/lib/plugin/autoLogin.js +4 -2
  41. package/lib/plugin/heal.js +40 -7
  42. package/lib/plugin/retryFailedStep.js +6 -1
  43. package/lib/plugin/stepByStepReport.js +2 -2
  44. package/lib/plugin/tryTo.js +5 -4
  45. package/lib/recorder.js +12 -5
  46. package/lib/ui.js +1 -0
  47. package/lib/workers.js +2 -0
  48. package/package.json +28 -25
  49. package/typings/index.d.ts +1 -1
  50. package/typings/promiseBasedTypes.d.ts +195 -76
  51. package/typings/types.d.ts +191 -145
  52. package/lib/helper/extras/PlaywrightReact.js +0 -9
@@ -20,7 +20,7 @@ chai.use(require('chai-match-pattern'));
20
20
  *{
21
21
  * helpers: {
22
22
  * Playwright: {...},
23
- * ExpectHelper: {},
23
+ * Expect: {},
24
24
  * }
25
25
  *}
26
26
  * ```
@@ -32,7 +32,7 @@ class ExpectHelper {
32
32
  *
33
33
  * @param {*} actualValue
34
34
  * @param {*} expectedValue
35
- * @param {*} customErrorMsg
35
+ * @param {*} [customErrorMsg]
36
36
  */
37
37
  expectEqual(actualValue, expectedValue, customErrorMsg = '') {
38
38
  // @ts-ignore
@@ -44,7 +44,7 @@ class ExpectHelper {
44
44
  *
45
45
  * @param {*} actualValue
46
46
  * @param {*} expectedValue
47
- * @param {*} customErrorMsg
47
+ * @param {*} [customErrorMsg]
48
48
  */
49
49
  expectNotEqual(actualValue, expectedValue, customErrorMsg = '') {
50
50
  // @ts-ignore
@@ -56,7 +56,7 @@ class ExpectHelper {
56
56
  *
57
57
  * @param {*} actualValue
58
58
  * @param {*} expectedValue
59
- * @param {*} customErrorMsg
59
+ * @param {*} [customErrorMsg]
60
60
 
61
61
  */
62
62
  expectDeepEqual(actualValue, expectedValue, customErrorMsg = '') {
@@ -69,7 +69,7 @@ class ExpectHelper {
69
69
  *
70
70
  * @param {*} actualValue
71
71
  * @param {*} expectedValue
72
- * @param {*} customErrorMsg
72
+ * @param {*} [customErrorMsg]
73
73
  */
74
74
  expectNotDeepEqual(actualValue, expectedValue, customErrorMsg = '') {
75
75
  // @ts-ignore
@@ -81,7 +81,7 @@ class ExpectHelper {
81
81
  *
82
82
  * @param {*} actualValue
83
83
  * @param {*} expectedValueToContain
84
- * @param {*} customErrorMsg
84
+ * @param {*} [customErrorMsg]
85
85
  */
86
86
  expectContain(actualValue, expectedValueToContain, customErrorMsg = '') {
87
87
  // @ts-ignore
@@ -95,7 +95,7 @@ class ExpectHelper {
95
95
  *
96
96
  * @param {*} actualValue
97
97
  * @param {*} expectedValueToNotContain
98
- * @param {*} customErrorMsg
98
+ * @param {*} [customErrorMsg]
99
99
  */
100
100
  expectNotContain(
101
101
  actualValue,
@@ -113,7 +113,7 @@ class ExpectHelper {
113
113
  *
114
114
  * @param {*} actualValue
115
115
  * @param {*} expectedValueToStartWith
116
- * @param {*} customErrorMsg
116
+ * @param {*} [customErrorMsg]
117
117
  */
118
118
  expectStartsWith(actualValue, expectedValueToStartWith, customErrorMsg = '') {
119
119
  // @ts-ignore
@@ -127,7 +127,7 @@ class ExpectHelper {
127
127
  *
128
128
  * @param {*} actualValue
129
129
  * @param {*} expectedValueToNotStartWith
130
- * @param {*} customErrorMsg
130
+ * @param {*} [customErrorMsg]
131
131
  */
132
132
  expectNotStartsWith(
133
133
  actualValue,
@@ -144,7 +144,7 @@ class ExpectHelper {
144
144
  /**
145
145
  * @param {*} actualValue
146
146
  * @param {*} expectedValueToEndWith
147
- * @param {*} customErrorMsg
147
+ * @param {*} [customErrorMsg]
148
148
  */
149
149
  expectEndsWith(actualValue, expectedValueToEndWith, customErrorMsg = '') {
150
150
  // @ts-ignore
@@ -157,7 +157,7 @@ class ExpectHelper {
157
157
  /**
158
158
  * @param {*} actualValue
159
159
  * @param {*} expectedValueToNotEndWith
160
- * @param {*} customErrorMsg
160
+ * @param {*} [customErrorMsg]
161
161
  */
162
162
  expectNotEndsWith(
163
163
  actualValue,
@@ -174,7 +174,7 @@ class ExpectHelper {
174
174
  /**
175
175
  * @param {*} targetData
176
176
  * @param {*} jsonSchema
177
- * @param {*} customErrorMsg
177
+ * @param {*} [customErrorMsg]
178
178
  */
179
179
  expectJsonSchema(targetData, jsonSchema, customErrorMsg = '') {
180
180
  // @ts-ignore
@@ -186,7 +186,7 @@ class ExpectHelper {
186
186
  /**
187
187
  * @param {*} targetData
188
188
  * @param {*} jsonSchema
189
- * @param {*} customErrorMsg
189
+ * @param {*} [customErrorMsg]
190
190
  * @param {*} ajvOptions Pass AJV options
191
191
  */
192
192
  expectJsonSchemaUsingAJV(
@@ -204,7 +204,7 @@ class ExpectHelper {
204
204
  /**
205
205
  * @param {*} targetData
206
206
  * @param {*} propertyName
207
- * @param {*} customErrorMsg
207
+ * @param {*} [customErrorMsg]
208
208
  */
209
209
  expectHasProperty(targetData, propertyName, customErrorMsg = '') {
210
210
  // @ts-ignore
@@ -215,7 +215,7 @@ class ExpectHelper {
215
215
  /**
216
216
  * @param {*} targetData
217
217
  * @param {*} propertyName
218
- * @param {*} customErrorMsg
218
+ * @param {*} [customErrorMsg]
219
219
  */
220
220
  expectHasAProperty(targetData, propertyName, customErrorMsg = '') {
221
221
  // @ts-ignore
@@ -226,7 +226,7 @@ class ExpectHelper {
226
226
  /**
227
227
  * @param {*} targetData
228
228
  * @param {*} type
229
- * @param {*} customErrorMsg
229
+ * @param {*} [customErrorMsg]
230
230
  */
231
231
  expectToBeA(targetData, type, customErrorMsg = '') {
232
232
  // @ts-ignore
@@ -237,7 +237,7 @@ class ExpectHelper {
237
237
  /**
238
238
  * @param {*} targetData
239
239
  * @param {*} type
240
- * @param {*} customErrorMsg
240
+ * @param {*} [customErrorMsg]
241
241
  */
242
242
  expectToBeAn(targetData, type, customErrorMsg = '') {
243
243
  // @ts-ignore
@@ -248,7 +248,7 @@ class ExpectHelper {
248
248
  /**
249
249
  * @param {*} targetData
250
250
  * @param {*} regex
251
- * @param {*} customErrorMsg
251
+ * @param {*} [customErrorMsg]
252
252
  */
253
253
  expectMatchRegex(targetData, regex, customErrorMsg = '') {
254
254
  // @ts-ignore
@@ -259,7 +259,7 @@ class ExpectHelper {
259
259
  /**
260
260
  * @param {*} targetData
261
261
  * @param {*} length
262
- * @param {*} customErrorMsg
262
+ * @param {*} [customErrorMsg]
263
263
  */
264
264
  expectLengthOf(targetData, length, customErrorMsg = '') {
265
265
  // @ts-ignore
@@ -269,7 +269,7 @@ class ExpectHelper {
269
269
 
270
270
  /**
271
271
  * @param {*} targetData
272
- * @param {*} customErrorMsg
272
+ * @param {*} [customErrorMsg]
273
273
  */
274
274
  expectEmpty(targetData, customErrorMsg = '') {
275
275
  // @ts-ignore
@@ -279,7 +279,7 @@ class ExpectHelper {
279
279
 
280
280
  /**
281
281
  * @param {*} targetData
282
- * @param {*} customErrorMsg
282
+ * @param {*} [customErrorMsg]
283
283
  */
284
284
  expectTrue(targetData, customErrorMsg = '') {
285
285
  // @ts-ignore
@@ -289,7 +289,7 @@ class ExpectHelper {
289
289
 
290
290
  /**
291
291
  * @param {*} targetData
292
- * @param {*} customErrorMsg
292
+ * @param {*} [customErrorMsg]
293
293
  */
294
294
  expectFalse(targetData, customErrorMsg = '') {
295
295
  // @ts-ignore
@@ -299,8 +299,8 @@ class ExpectHelper {
299
299
 
300
300
  /**
301
301
  * @param {*} targetData
302
- * @param {*} aboveThan number | Date
303
- * @param {*} customErrorMsg
302
+ * @param {*} aboveThan
303
+ * @param {*} [customErrorMsg]
304
304
  */
305
305
  expectAbove(targetData, aboveThan, customErrorMsg = '') {
306
306
  // @ts-ignore
@@ -310,8 +310,8 @@ class ExpectHelper {
310
310
 
311
311
  /**
312
312
  * @param {*} targetData
313
- * @param {*} belowThan number | Date
314
- * @param {*} customErrorMsg
313
+ * @param {*} belowThan
314
+ * @param {*} [customErrorMsg]
315
315
  */
316
316
  expectBelow(targetData, belowThan, customErrorMsg = '') {
317
317
  // @ts-ignore
@@ -322,7 +322,7 @@ class ExpectHelper {
322
322
  /**
323
323
  * @param {*} targetData
324
324
  * @param {*} lengthAboveThan
325
- * @param {*} customErrorMsg
325
+ * @param {*} [customErrorMsg]
326
326
  */
327
327
  expectLengthAboveThan(targetData, lengthAboveThan, customErrorMsg = '') {
328
328
  // @ts-ignore
@@ -335,7 +335,7 @@ class ExpectHelper {
335
335
  /**
336
336
  * @param {*} targetData
337
337
  * @param {*} lengthBelowThan
338
- * @param {*} customErrorMsg
338
+ * @param {*} [customErrorMsg]
339
339
  */
340
340
  expectLengthBelowThan(targetData, lengthBelowThan, customErrorMsg = '') {
341
341
  // @ts-ignore
@@ -348,7 +348,7 @@ class ExpectHelper {
348
348
  /**
349
349
  * @param {*} actualValue
350
350
  * @param {*} expectedValue
351
- * @param {*} customErrorMsg
351
+ * @param {*} [customErrorMsg]
352
352
  */
353
353
  expectEqualIgnoreCase(actualValue, expectedValue, customErrorMsg = '') {
354
354
  // @ts-ignore
@@ -362,7 +362,7 @@ class ExpectHelper {
362
362
  * expects members of two arrays are deeply equal
363
363
  * @param {*} actualValue
364
364
  * @param {*} expectedValue
365
- * @param {*} customErrorMsg
365
+ * @param {*} [customErrorMsg]
366
366
  */
367
367
  expectDeepMembers(actualValue, expectedValue, customErrorMsg = '') {
368
368
  // @ts-ignore
@@ -376,7 +376,7 @@ class ExpectHelper {
376
376
  * expects an array to be a superset of another array
377
377
  * @param {*} superset
378
378
  * @param {*} set
379
- * @param {*} customErrorMsg
379
+ * @param {*} [customErrorMsg]
380
380
  */
381
381
  expectDeepIncludeMembers(superset, set, customErrorMsg = '') {
382
382
  // @ts-ignore
@@ -391,7 +391,7 @@ class ExpectHelper {
391
391
  * @param {*} actualValue
392
392
  * @param {*} expectedValue
393
393
  * @param {*} fieldsToExclude
394
- * @param {*} customErrorMsg
394
+ * @param {*} [customErrorMsg]
395
395
  */
396
396
  expectDeepEqualExcluding(
397
397
  actualValue,
@@ -410,7 +410,7 @@ class ExpectHelper {
410
410
  * expects a JSON object matches a provided pattern
411
411
  * @param {*} actualValue
412
412
  * @param {*} expectedPattern
413
- * @param {*} customErrorMsg
413
+ * @param {*} [customErrorMsg]
414
414
  */
415
415
  expectMatchesPattern(actualValue, expectedPattern, customErrorMsg = '') {
416
416
  // @ts-ignore
@@ -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 {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
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 {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
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 {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
779
- * @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
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 {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
802
- * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
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 {CodeceptJS.LocatorOrString} locator clickable element located by CSS|XPath|strict locator.
826
- * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
959
- * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
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 {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
982
- * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
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 {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1008
- * @param {CodeceptJS.StringOrSecret} value text value to fill.
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 {LocatorOrString} editable field located by label|name|CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
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 {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1067
- * @param {CodeceptJS.StringOrSecret} value value to check.
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 {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1086
- * @param {CodeceptJS.StringOrSecret} value value to check.
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 {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {LocatorOrString} locator element located by CSS|XPath|strict locator.
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 {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
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