Skip to content

Commit

Permalink
[java] Removing deprecated createServiceWithConfig in ChromeDriverS…
Browse files Browse the repository at this point in the history
…ervice
  • Loading branch information
diemol committed Jul 25, 2023
1 parent 9b7c1fb commit fab49a5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion java/src/org/openqa/selenium/chrome/ChromeDriver.java
Expand Up @@ -68,7 +68,7 @@ public ChromeDriver(ChromeDriverService service) {
* @see #ChromeDriver(ChromeDriverService, ChromeOptions)
*/
public ChromeDriver(ChromeOptions options) {
this(ChromeDriverService.createServiceWithConfig(options), options);
this(ChromeDriverService.createDefaultService(), options);
}

/**
Expand Down
17 changes: 0 additions & 17 deletions java/src/org/openqa/selenium/chrome/ChromeDriverService.java
Expand Up @@ -166,23 +166,6 @@ public static ChromeDriverService createDefaultService() {
return new Builder().build();
}

/**
* Configures and returns a new {@link ChromeDriverService} using the supplied configuration. In
* this configuration, the service will use the ChromeDriver executable identified by {@link
* org.openqa.selenium.remote.service.DriverFinder#getPath(DriverService, Capabilities)}. Each
* service created by this method will be configured to use a free port on the current system.
*
* @return A new ChromeDriverService using the supplied configuration from {@link ChromeOptions}.
* @deprecated Use {@link Builder#withLogLevel(ChromiumDriverLogLevel)} }
*/
@Deprecated
public static ChromeDriverService createServiceWithConfig(ChromeOptions options) {
ChromeDriverLogLevel oldLevel = options.getLogLevel();
ChromiumDriverLogLevel level =
(oldLevel == null) ? null : ChromiumDriverLogLevel.fromString(oldLevel.toString());
return new Builder().withLogLevel(level).build();
}

/** Builder used to configure new {@link ChromeDriverService} instances. */
@AutoService(DriverService.Builder.class)
public static class Builder
Expand Down

0 comments on commit fab49a5

Please sign in to comment.