You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Codecept.run() should return promise
* Pause accepts optional support object
* executeScript can return a value
* Update docs
* Expand pause param type
* Simplify pause param type
Copy file name to clipboardExpand all lines: docs/helpers/Nightmare.md
+26-24Lines changed: 26 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -379,9 +379,10 @@ let val = await I.executeAsyncScript(function(url, done) {
379
379
#### Parameters
380
380
381
381
- `args` **...any** to be passed to function.
382
-
⚠️ returns a _promise_ which is synchronized internally by recorderWrapper for asynchronous [evaluate][7].
383
-
Unlike NightmareJS implementation calling `done` will return its first argument.
384
-
- `fn` **([string][3] | [function][8])** function to be executed in browser context.
382
+
- `fn` **([string][3] | [function][7])** function to be executed in browser context.
383
+
384
+
Returns **[Promise][8]<any>** script return value⚠️ returns a _promise_ which is synchronized internally by recorderWrapper for asynchronous [evaluate][9].
385
+
Unlike NightmareJS implementation calling `done` will return its first argument.
385
386
386
387
### executeScript
387
388
@@ -412,8 +413,9 @@ let date = await I.executeScript(function(el) {
412
413
#### Parameters
413
414
414
415
- `args` **...any** to be passed to function.
415
-
⚠️ returns a _promise_ which is synchronized internally by recorderWrapper for synchronous [evaluate][7]
416
-
- `fn` **([string][3] | [function][8])** function to be executed in browser context.
416
+
- `fn` **([string][3] | [function][7])** function to be executed in browser context.
417
+
418
+
Returns **[Promise][8]<any>** script return value⚠️ returns a _promise_ which is synchronized internally by recorderWrapper for synchronous [evaluate][9]
417
419
418
420
### fillField
419
421
@@ -452,7 +454,7 @@ let hint = await I.grabAttributeFrom('#tooltip', 'title');
452
454
- `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
453
455
- `attr` **[string][3]** attribute name.
454
456
455
-
Returns **[Promise][9]<[string][3]>** attribute value
457
+
Returns **[Promise][8]<[string][3]>** attribute value
456
458
457
459
### grabAttributeFromAll
458
460
@@ -468,7 +470,7 @@ let hints = await I.grabAttributeFromAll('.tooltip', 'title');
468
470
- `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
469
471
- `attr` **[string][3]** attribute name.
470
472
471
-
Returns **[Promise][9]<[Array][10]<[string][3]>>** attribute value
473
+
Returns **[Promise][8]<[Array][10]<[string][3]>>** attribute value
Returns **([Promise][9]<[string][3]> | [Promise][9]<[Array][10]<[string][3]>>)** attribute valueCookie in JSON format. If name not passed returns all cookies for this domain.Multiple cookies can be received by passing query object `I.grabCookie({ secure:true});`. If you'd like get all cookies for all urls, use: `.grabCookie({ url:null }).`
490
+
Returns **([Promise][8]<[string][3]> | [Promise][8]<[Array][10]<[string][3]>>)** attribute valueCookie in JSON format. If name not passed returns all cookies for this domain.Multiple cookies can be received by passing query object `I.grabCookie({ secure:true});`. If you'd like get all cookies for all urls, use: `.grabCookie({ url:null }).`
489
491
490
492
### grabCssPropertyFrom
491
493
@@ -502,7 +504,7 @@ const value = await I.grabCssPropertyFrom('h3', 'font-weight');
502
504
- `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
0 commit comments