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
The `phantomjs` binary will be accessible in `./node_modules/.bin`. If you do not start the Selenium server using `npm test` or other `npm run` command, you will had to add this directory to your `PATH`, otherwise the PhantomJS driver will not find the executable. Additionally, PhantomJS 2.1.1 works only with the Selenium driver version 3.7.1 or older.
509
508
509
+
If you want to test with a headless browser, you may want to prefer Chrome to PhantomJS. Chrome can run in the headless mode too and PhantomJS is not developed any more. The default configuration of this task will choose Chrome in the headless mode:
510
+
511
+
```js
512
+
'html-dom-snapshot': {
513
+
options: {
514
+
webdriver: {
515
+
desiredCapabilities: {
516
+
browserName:'chrome',
517
+
chromeOptions: {
518
+
args: ['--headless']
519
+
}
520
+
}
521
+
}
522
+
}
523
+
}
524
+
```
525
+
526
+
If you want to run Chrome in the windowed mode, override the `chromeOptions` object with yours, even an empty one, which is missing the `--headless` argument, for example:
527
+
528
+
```js
529
+
'html-dom-snapshot': {
530
+
options: {
531
+
webdriver: {
532
+
desiredCapabilities: {
533
+
browserName:'chrome',
534
+
chromeOptions: {}
535
+
}
536
+
}
537
+
}
538
+
}
539
+
```
540
+
510
541
## Contributing
511
542
512
543
In lieu of a formal styleguide, take care to maintain the existing coding
@@ -515,6 +546,7 @@ your code using Grunt.
515
546
516
547
## Release History
517
548
549
+
* 2018-11-26 [v2.0.0] Use headless Chrome instead of PhantomJS by default
0 commit comments