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.
feat(runner): add a new method of getting browser drivers - directConnect
directConnect as an option on the configuration will replace chromeOnly.
Now, WebDriverJS allows Firefox to be used directly as well, so directConnect
will work for Chrome and Firefox, and throw an error if another browser is used.
This change deprecates but does not remove the chromeOnly option.
Copy file name to clipboardExpand all lines: docs/browser-setup.md
-9
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,6 @@ capabilities: {
57
57
}
58
58
},
59
59
```
60
-
If running with `chromeOnly` and `chromeOptions` together, chromeOptions.args and chromeOptions.extensions are required due to [Issue 6627](https://code.google.com/p/selenium/issues/detail?id=6627&thanks=6627&ts=1385488060) of selenium-webdriver currently(@2.37.0). So in order to avoid the issue, you may simply set them(or one of them) to an empty array.
Copy file name to clipboardExpand all lines: docs/server-setup.md
+9-8
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
Setting Up the Selenium Server
2
2
==============================
3
3
4
-
When working with Protractor you will most likely use the Selenium Server. The server acts as proxy between your test script (written with the WebDriver API) and the browser driver (controlled by the WebDriver protocols).
4
+
When working with Protractor, you need to specify how to connect to the browser drivers which will start up and control the browsers you are testing on. You will most likely use the Selenium Server. The server acts as proxy between your test script (written with the WebDriver API) and the browser driver (controlled by the WebDriver protocols).
5
5
6
-
The server forwards commands from your script to the driver and returns responses from the driver to your script. The server can handle multiple scripts in different languages. The server can startup and manage multiple browsers in different versions and implementations.
6
+
The server forwards commands from your script to the driver and returns responses from the driver to your script. The server can handle multiple scripts in different languages. The server can startup and manage multiple browsers in different versions and implementations.
@@ -35,6 +35,9 @@ To install and start the standalone Selenium Server manually, use the webdriver-
35
35
36
36
3. Leave the server running while you conduct your test sessions.
37
37
38
+
4. In your config file, set `seleniumAddress` to the address of the running server. This defaults to
39
+
`http://localhost:4444/wd/hub`.
40
+
38
41
39
42
**Starting the Server from a Test Script**
40
43
@@ -67,13 +70,11 @@ In your config file, set these options:
67
70
Please note that if you set `sauceUser` and `sauceKey`, the settings for `seleniumServerJar`, `seleniumPort` and `seleniumArgs` will be ignored.
68
71
69
72
70
-
Selenium Server and the Chrome Browser
73
+
Connecting Directly to Browser Drivers
71
74
--------------------------------------
72
75
73
-
The Selenium Server is optional when you test against the Chrome browser. In your config file, you can set the chromeOnly option to true or false:
74
-
75
-
-`chromeOnly: false` - Your test script communicates with the Selenium Server (running locally or remotely). This is the default setting.
76
+
Protractor can test directly against Chrome and Firefox without using a Selenium Server. To use this, in your config file set `directConnect: true`.
76
77
77
-
-`chromeOnly: true` - Your test script communicates directly with the ChromeDriver. The Selenium Server (running locally or remotely) will be ignored.
78
+
-`directConnect: true` - Your test script communicates directly Chrome Driver or Firefox Driver, bypassing any Selenium Server. If this is true, settings for `seleniumAddress` and `seleniumServerJar`will be ignored. If you attempt to use a browser other than Chrome or Firefox an error will be thrown.
78
79
79
-
The advantage of running only with Chrome is that your test scripts will start up and run faster. For more detailed information about chromeOnly, see the [chrome.js source code](https://code.google.com/p/selenium/source/browse/javascript/node/selenium-webdriver/chrome.js).
80
+
The advantage of directly connecting to browser drivers is that your test scripts may start up and run faster.
0 commit comments