[java] Calling more specific driver constructor that accepts *Options object as a parameter.
@@ -45,6 +45,11 @@ public WebDriver get() {
return null;
}
+ try {
+ return driverClass.getConstructor(desiredCapabilities.getClass()).newInstance(desiredCapabilities);
+ } catch (InvocationTargetException e) {
+ }
+
return driverClass.getConstructor(Capabilities.class).newInstance(desiredCapabilities);
} catch (InvocationTargetException e) {
throw new RuntimeException(e.getTargetException());
