Skip to content

Commit

Permalink
[java] Setting output to json when getting driver path
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Mar 16, 2023
1 parent d8474fb commit a310907
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions java/src/org/openqa/selenium/manager/SeleniumManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ public String getDriverPath(Capabilities options) {
return null;
}
List<String> commandList =
Arrays.asList(binaryFile.getAbsolutePath(), "--browser", options.getBrowserName(),
Arrays.asList(binaryFile.getAbsolutePath(),
"--browser", options.getBrowserName(),
"--output", "json");
if (!options.getBrowserVersion().isEmpty()) {
commandList.addAll(Arrays.asList("--browser-version", options.getBrowserVersion()));
Expand All @@ -177,7 +178,9 @@ public String getDriverPath(String driverName) {
if(binaryFile == null) {
return null;
}
ImmutableList<String> commandList = ImmutableList.of(binaryFile.getAbsolutePath(), "--driver", driverName);
ImmutableList<String> commandList = ImmutableList.of(binaryFile.getAbsolutePath(),
"--driver", driverName,
"--output", "json");
return runCommand(commandList.toArray(new String[0]));
}
}

0 comments on commit a310907

Please sign in to comment.