Skip to content

Commit 084465b

Browse files
committed
[java] Use output json when calling selenium-manager and format code
1 parent 62a66dd commit 084465b

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

java/src/org/openqa/selenium/manager/SeleniumManager.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,17 @@ private synchronized File getBinary() {
159159
* @return the location of the driver.
160160
*/
161161
public String getDriverPath(Capabilities options) {
162-
File binaryFile = getBinary();
163-
if(binaryFile == null) {
164-
return null;
165-
}
166-
List<String> commandList = Arrays.asList(binaryFile.getAbsolutePath(), "--browser", options.getBrowserName());
167-
if (!options.getBrowserVersion().isEmpty()) {
168-
commandList.addAll(Arrays.asList("--browser-version", options.getBrowserVersion()));
169-
}
170-
return runCommand(commandList.toArray(new String[0]));
162+
File binaryFile = getBinary();
163+
if (binaryFile == null) {
164+
return null;
165+
}
166+
List<String> commandList =
167+
Arrays.asList(binaryFile.getAbsolutePath(), "--browser", options.getBrowserName(),
168+
"--output", "json");
169+
if (!options.getBrowserVersion().isEmpty()) {
170+
commandList.addAll(Arrays.asList("--browser-version", options.getBrowserVersion()));
171+
}
172+
return runCommand(commandList.toArray(new String[0]));
171173
}
172174

173175
public String getDriverPath(String driverName) {

0 commit comments

Comments
 (0)