Skip to content

Commit

Permalink
Implement avoidAutoVersion method in WebDriverManager API
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed Sep 4, 2018
1 parent 17eabe5 commit ee9a3f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ public WebDriverManager avoidOutputTree() {
return instanceMap.get(driverManagerType);
}

public WebDriverManager avoidAutoVersion() {
config().setAvoidAutoVersion(true);
return instanceMap.get(driverManagerType);
}

// ------------

public String getBinaryPath() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class ForceDownloadTest {

@Test
public void test() {
WebDriverManager.chromedriver().forceDownload().setup();
WebDriverManager.chromedriver().forceDownload().avoidAutoVersion()
.timeout(20).setup();
assertThat(WebDriverManager.chromedriver().getBinaryPath(),
notNullValue());
}
Expand Down

0 comments on commit ee9a3f3

Please sign in to comment.