fix #782 catch SessionNotFoundException
This commit is contained in:
parent
cb9987d862
commit
9b7d01339e
1 changed files with 2 additions and 1 deletions
|
@ -43,6 +43,7 @@ import org.openqa.selenium.phantomjs.PhantomJSDriver;
|
|||
import org.openqa.selenium.phantomjs.PhantomJSDriverService;
|
||||
import org.openqa.selenium.phantomjs.PhantomJSDriverService.Builder;
|
||||
import org.openqa.selenium.remote.DesiredCapabilities;
|
||||
import org.openqa.selenium.remote.SessionNotFoundException;
|
||||
import org.openqa.selenium.remote.UnreachableBrowserException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -143,7 +144,7 @@ public class WebDriverGenerator extends BaseThumbnailGenerator {
|
|||
final File thumbnail = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.FILE);
|
||||
convert(thumbnail, outputFile);
|
||||
return true;
|
||||
} catch (final UnreachableBrowserException e) {
|
||||
} catch (final UnreachableBrowserException | SessionNotFoundException e) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("WebDriver is not available.", e);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue