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
{{ message }}
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/browser-setup.md
+31-1
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,19 @@ capabilities: {
54
54
},
55
55
```
56
56
57
+
Adding Firefox-Specific Options
58
+
------------------------------
59
+
60
+
Firefox options are nested in the `moz:firefoxOptions` object. A full list of options is at the [GeckoDriver](https://github.com/mozilla/geckodriver#firefox-capabilities) Github page. For example, to run in safe mode, your configuration would look like this:
61
+
62
+
```javascript
63
+
capabilities: {
64
+
'browserName':'firefox',
65
+
'moz:firefoxOptions': {
66
+
'args': ['--safe-mode']
67
+
}
68
+
},
69
+
```
57
70
58
71
Testing Against Multiple Browsers
59
72
---------------------------------
@@ -118,7 +131,10 @@ browser2.$('.css').click();
118
131
119
132
Setting up PhantomJS
120
133
--------------------
121
-
PhantomJS is [no longer officially supported](https://groups.google.com/forum/#!topic/phantomjs/9aI5d-LDuNE). Instead, we recommend either [running Chrome in Xvfb](http://www.tothenew.com/blog/protractor-with-jenkins-and-headless-chrome-xvfb-setup/) or using Chrome's [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome).
134
+
PhantomJS is [no longer officially supported](https://groups.google.com/forum/#!topic/phantomjs/9aI5d-LDuNE). Instead, we recommend to use one of the following alternatives:
135
+
1. Chrome with [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). Available in Chrome 59+ on Linux/Mac OS X, and in Chrome 60+ on Windows.
136
+
2. Firefox with [headless mode](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#-headless). Available in Firefox 55+ on Linux, and in Firefox 56+ on Windows/Mac OS X.
137
+
3. Chrome with [Xvfb](http://www.tothenew.com/blog/protractor-with-jenkins-and-headless-chrome-xvfb-setup/).
122
138
123
139
124
140
Using headless Chrome
@@ -138,3 +154,17 @@ capabilities: {
138
154
}
139
155
}
140
156
```
157
+
158
+
Using headless Firefox
159
+
---------------------
160
+
To start Firefox in headless mode, start Firefox with the [`--headless` flag](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#-headless).
0 commit comments