-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ChromeOptions and FirefoxOptions instead of DesiredCapabilities (#…
…995)
- Loading branch information
Showing
16 changed files
with
136 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 10 additions & 6 deletions
16
modules/selenium/src/test/java/org/testcontainers/junit/ChromeWebDriverContainerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
package org.testcontainers.junit; | ||
|
||
import org.junit.Before; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.openqa.selenium.remote.DesiredCapabilities; | ||
import org.openqa.selenium.chrome.ChromeOptions; | ||
import org.testcontainers.containers.BrowserWebDriverContainer; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* | ||
*/ | ||
public class ChromeWebDriverContainerTest extends BaseWebDriverContainerTest { | ||
|
||
@Rule | ||
public BrowserWebDriverContainer chrome = new BrowserWebDriverContainer() | ||
.withDesiredCapabilities(DesiredCapabilities.chrome()); | ||
.withCapabilities(new ChromeOptions()); | ||
|
||
@Before | ||
public void checkBrowserIsIndeedChrome() { | ||
assertBrowserNameIs(chrome, "chrome"); | ||
} | ||
|
||
@Test | ||
public void simpleTest() throws IOException { | ||
public void simpleTest() { | ||
doSimpleWebdriverTest(chrome); | ||
} | ||
|
||
@Test | ||
public void simpleExploreTest() throws IOException { | ||
public void simpleExploreTest() { | ||
doSimpleExplore(chrome); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...les/selenium/src/test/java/org/testcontainers/junit/ContainerWithoutCapabilitiesTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.testcontainers.junit; | ||
|
||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.testcontainers.containers.BrowserWebDriverContainer; | ||
|
||
public class ContainerWithoutCapabilitiesTest extends BaseWebDriverContainerTest{ | ||
|
||
@Rule | ||
public BrowserWebDriverContainer chrome = new BrowserWebDriverContainer(); | ||
|
||
@Test | ||
public void chromeIsStartedIfNoCapabilitiesProvided() { | ||
assertBrowserNameIs(chrome, "chrome"); | ||
} | ||
|
||
@Test | ||
public void simpleExploreTestWhenNoCapabilitiesProvided(){ | ||
doSimpleExplore(chrome); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.