mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 23:01:04 +00:00
Bug 4339: fixed a potential failure due to webdriver implementations
that do not support maximizing the browser window
This commit is contained in:
1 parent
d09b3899e5
commit
45ad7b5e7e
1 file changed
+6
-1
+6
-1
@@ -176,7 +176,12 @@ public class SeleniumRunner extends ParentRunner<SeleniumJUnit4ClassRunner> {
|
||||
DesiredCapabilities capabilities = new DesiredCapabilities(capabilityDefinitions);
|
||||
Constructor<WebDriver> constructor = clazz.getConstructor(Capabilities.class);
|
||||
WebDriver driver = constructor.newInstance(capabilities);
|
||||
driver.manage().window().maximize();
|
||||
try {
|
||||
driver.manage().window().maximize();
|
||||
} catch (Exception e) {
|
||||
// Depending on the combination of OS and WebDriver implementation this may fail
|
||||
// e.g. chrome with xvfb can't do this successfully.
|
||||
}
|
||||
|
||||
File screenshots = resolveScreenshotFolder();
|
||||
|
||||
|
||||
Reference in new issue
Block a user