Merge branch 'master' into 10.3.x
This commit is contained in:
commit
a94d15d0ca
1 changed files with 9 additions and 5 deletions
|
@ -94,7 +94,9 @@ public class WebDriverGenerator extends BaseThumbnailGenerator {
|
|||
@Override
|
||||
public void destroy() {
|
||||
if (webDriver != null) {
|
||||
webDriver.quit();
|
||||
synchronized (this) {
|
||||
webDriver.quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,10 +123,12 @@ public class WebDriverGenerator extends BaseThumbnailGenerator {
|
|||
}
|
||||
|
||||
if (webDriver instanceof TakesScreenshot) {
|
||||
webDriver.get(url);
|
||||
final File thumbnail = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.FILE);
|
||||
convert(thumbnail, outputFile);
|
||||
return true;
|
||||
synchronized (this) {
|
||||
webDriver.get(url);
|
||||
final File thumbnail = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.FILE);
|
||||
convert(thumbnail, outputFile);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
logger.warn("WebDriver is not instance of TakesScreenshot: " + webDriver);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue