Skip to content

Commit

Permalink
[java] Add check back to driver service session factory
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani committed Jan 8, 2024
1 parent a040c34 commit e1e538e
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,12 @@ public Either<WebDriverException, ActiveSession> apply(CreateSessionRequest sess
attributeMap.put(AttributeKey.LOGGER_CLASS.getKey(), this.getClass().getName());

DriverService service = builder.build();
Result driverResult = DriverFinder.getPath(service, capabilities);
service.setExecutable(driverResult.getDriverPath());
if (driverResult.getBrowserPath() != null && !driverResult.getBrowserPath().isEmpty()) {
capabilities = setBrowserBinary(capabilities, driverResult.getBrowserPath());
if (service.getExecutable() == null) {
Result driverResult = DriverFinder.getPath(service, capabilities);
service.setExecutable(driverResult.getDriverPath());
if (driverResult.getBrowserPath() != null && !driverResult.getBrowserPath().isEmpty()) {
capabilities = setBrowserBinary(capabilities, driverResult.getBrowserPath());
}
}

Optional<Platform> platformName = Optional.ofNullable(capabilities.getPlatformName());
Expand Down

0 comments on commit e1e538e

Please sign in to comment.