Skip to content

Commit

Permalink
test: fixed test to work with new isAlive implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
YamStranger committed May 11, 2016
1 parent b902c2e commit b50a1f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -805,7 +805,7 @@ public static boolean isAlive(final WebDriver driver) {
}
return true;
}

public static boolean isNotAlive(final WebDriver driver){
return !isAlive(driver);
}
Expand Down
Expand Up @@ -15,7 +15,7 @@ class WhenTakingScreenshotsFromDiedBrowser extends Specification {
def "when a photo session with died browser is used it should not take a photo"() {
given:
def driver = Mock(WebDriver)
driver.getTitle() >> { throw new NoSuchWindowException("Some exception ") };
driver.getCurrentUrl() >> { throw new NoSuchWindowException("Some exception ") };
def session = new PhotoSession(driver, folder.newFolder().toPath(), BlurLevel.NONE)
when:
def photo = session.takeScreenshot()
Expand All @@ -26,7 +26,7 @@ class WhenTakingScreenshotsFromDiedBrowser extends Specification {
def "when a for saving page source died is used browser it should not try to save page source"() {
given:
def driver = Mock(WebDriver)
driver.getTitle() >> { throw new NoSuchWindowException("Some exception ") };
driver.getCurrentUrl() >> { throw new NoSuchWindowException("Some exception ") };
def recorder = new PageSourceRecorder(driver)
when:
def photo = recorder.intoDirectory(folder.newFolder().toPath())
Expand Down

0 comments on commit b50a1f8

Please sign in to comment.