Skip to content

Commit 65553a1

Browse files
committed
Deprecate ChromeDriver constructors that take a DriverService
If you're at this point, then you might as well just create a DriverCommandExecutor and create Capabilities yourself.
1 parent db037dd commit 65553a1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

java/client/src/org/openqa/selenium/chrome/ChromeDriver.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ public ChromeDriver() {
129129
* and shutdown upon calling {@link #quit()}.
130130
*
131131
* @param service The service to use.
132-
* @see #ChromeDriver(ChromeDriverService, ChromeOptions)
132+
* @see RemoteWebDriver(org.openqa.selenium.remote.CommandExecutor, Capabilities)
133+
* @deprecated Use {@link RemoteWebDriver(org.openqa.selenium.remote.CommandExecutor, Capabilities)}
133134
*/
135+
@Deprecated
134136
public ChromeDriver(ChromeDriverService service) {
135137
this(service, new ChromeOptions());
136138
}
@@ -162,7 +164,9 @@ public ChromeDriver(ChromeOptions options) {
162164
*
163165
* @param service The service to use.
164166
* @param options The options to use.
167+
* @deprecated Use {@link RemoteWebDriver(org.openqa.selenium.remote.CommandExecutor, Capabilities)}
165168
*/
169+
@Deprecated
166170
public ChromeDriver(ChromeDriverService service, ChromeOptions options) {
167171
this(service, options.toCapabilities());
168172
}
@@ -173,7 +177,9 @@ public ChromeDriver(ChromeDriverService service, ChromeOptions options) {
173177
*
174178
* @param service The service to use.
175179
* @param capabilities The capabilities required from the ChromeDriver.
180+
* @deprecated Use {@link RemoteWebDriver(org.openqa.selenium.remote.CommandExecutor, Capabilities)}
176181
*/
182+
@Deprecated
177183
public ChromeDriver(ChromeDriverService service, Capabilities capabilities) {
178184
super(new ChromeDriverCommandExecutor(service), capabilities);
179185
locationContext = new RemoteLocationContext(getExecuteMethod());

0 commit comments

Comments
 (0)