Skip to content

Commit 86f1c02

Browse files
committed
[java] Calling more specific driver constructor that accepts *Options object as a parameter.
1 parent 888fb8b commit 86f1c02

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

java/client/test/org/openqa/selenium/testing/drivers/ReflectionBackedDriverSupplier.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ public WebDriver get() {
4545
return null;
4646
}
4747

48+
try {
49+
return driverClass.getConstructor(desiredCapabilities.getClass()).newInstance(desiredCapabilities);
50+
} catch (InvocationTargetException e) {
51+
}
52+
4853
return driverClass.getConstructor(Capabilities.class).newInstance(desiredCapabilities);
4954
} catch (InvocationTargetException e) {
5055
throw new RuntimeException(e.getTargetException());

0 commit comments

Comments
 (0)