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
*[Puppeteer] Stability improvement. Waits for for `load` event on page load. This strategy can be changed in config:
7
+
*`waitForNavigation` config option introduced. Possible options: `load`, `domcontentloaded`, `networkidle0`, `networkidle2`. See [Puppeteer API](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions)
8
+
*`getPageTimeout` config option to set maximum navigation time in milliseconds. Default is 30 seconds.
9
+
*`waitForNavigation` method added. Explicitly waits for navigation to be finished.
10
+
*[Puppeteer] Fixed `resizeWindow` by @sergejkaravajnij
11
+
*[WebDriverIO][Protractor][Puppeteer][Nightmare]`grabTextFrom` unified. Return a text for single matched element and an array of texts for multiple elements.
12
+
*[WebDriverIO][Protractor][Puppeteer][Nightmare]`waitForFunction` added. Waits for client-side JavaScript function to return true by @GREENpoint.
13
+
*[Puppeteer]`waitUntil` deprecated in favor of `waitForFunction`.
14
+
* Added `filter` function to DataTable.
15
+
* Send non-nested array of files to custom parallel execution chunking by @mikecbrant.
16
+
* Fixed invalid output directory path for run-multiple by @mikecbrant.
17
+
*[WebDriverIO]`waitUntil` timeout accepts time in seconds (as all other wait* functions). Fix by @truesrc.
18
+
*[Nightmare] Fixed grabNumberOfVisibleElements to work similarly to `seeElement`. Thx to @stefanschenk and Jinbo Jinboson.
19
+
*[Protractor] Fixed alert handling error with message 'no such alert' by @truesrc.
*Note: Currently multiple sessions work only in WebDriverIO and Protractor*
269
-
270
268
CodeceptJS allows to run several browser sessions inside a test. This can be useful for testing communication between users inside a system, for instance in chats. To open another browser use `session()` function as shown in example:
Copy file name to clipboardExpand all lines: docs/puppeteer.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,21 @@ Make sure `Puppeteer` helper is enabled in `codecept.json` config:
56
56
57
57
Turn on the `show` option if you want to follow test progress in a window. This is very useful for debugging.
58
58
59
-
Sometimes test may run faster than application gets rendered. In this case it is **recommended to increase `waitForAction` config value**. It will wait for a small amount of time (100ms) by default after each user action taken.
59
+
Puppeteer uses different strategies to detect if a page is loaded. In configuration use `waitForNavigation` option for that:
60
+
61
+
By default it is set to `domcontentloaded` which waits for `DOMContentLoaded` event being fired. However, for Single Page Applications it's more useful to set this value to `networkidle0` which waits for all network connections to be finished.
62
+
63
+
```js
64
+
"helpers": {
65
+
"Puppeteer": {
66
+
"url":"http://localhost",
67
+
"waitForNavigation":"networkidle0"
68
+
}
69
+
}
70
+
```
71
+
72
+
WHen a test runs faster than application it is recommended to increase `waitForAction` config value.
73
+
It will wait for a small amount of time (100ms) by default after each user action is taken.
60
74
61
75
*More options are listed in [helper reference](http://codecept.io/helpers/Puppeteer/).*
0 commit comments