[java] Fixing HtmlUnit driver initialization in tests
@@ -47,7 +47,7 @@ public WebDriver get() {
try {
return driverClass.getConstructor(desiredCapabilities.getClass()).newInstance(desiredCapabilities);
- } catch (InvocationTargetException e) {
+ } catch (NoSuchMethodException | InvocationTargetException e) {
}
return driverClass.getConstructor(Capabilities.class).newInstance(desiredCapabilities);
