Skip to content

Commit 8d49644

Browse files
committed
fix test error due to changes in geckodriver 0.27.0.
1 parent dffb45c commit 8d49644

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cache:
66
- $HOME/.m2
77
install:
88
- gd_url=https://github.com/mozilla/geckodriver/releases/download
9-
- gd_ver=v0.21.0
9+
- gd_ver=v0.27.0
1010
- ( mkdir -pv bin; cd bin ; curl -L "${gd_url}/${gd_ver}/geckodriver-${gd_ver}-linux64.tar.gz" | gunzip | tar xf - ; chmod +x geckodriver )
1111
- mvn -B -V dependency:resolve
1212
before_script:

src/test/java/jp/vmi/selenium/webdriver/FirefoxDriverFactoryTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import org.junit.Test;
77
import org.junit.rules.ExternalResource;
88
import org.junit.rules.TemporaryFolder;
9-
import org.openqa.selenium.SessionNotCreatedException;
9+
import org.openqa.selenium.InvalidArgumentException;
1010

1111
import static org.openqa.selenium.firefox.FirefoxDriver.SystemProperty.*;
1212

@@ -52,14 +52,14 @@ protected void after() {
5252
* Test of not finding Firefox binary.
5353
*
5454
* @throws IOException exception.
55-
* @throws IllegalArgumentException exception.
55+
* @throws InvalidArgumentException exception.
5656
*/
57-
@Test(expected = IllegalStateException.class)
58-
public void firefoxNotFoundIn_webdriver_firefox_bin() throws IOException, IllegalArgumentException {
57+
@Test(expected = InvalidArgumentException.class)
58+
public void firefoxNotFoundIn_webdriver_firefox_bin() throws IOException, InvalidArgumentException {
5959
try {
6060
new FirefoxDriverFactory().newInstance(new DriverOptions());
61-
} catch (SessionNotCreatedException e) {
62-
throw new IllegalStateException(e);
61+
} catch (IllegalStateException e) {
62+
throw new InvalidArgumentException(e.getMessage(), e);
6363
}
6464
}
6565
}

0 commit comments

Comments
 (0)