-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify Selenium container startup detection (#351)
* Modify Selenium container startup detection, using alternative readiness string observed in v3.x of Selenium containers. * Simplify string * Revert simplification (needed for 2.45.0) * Update test following comments
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
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
30 changes: 30 additions & 0 deletions
30
modules/selenium/src/test/java/org/testcontainers/junit/Selenium3xTest.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,30 @@ | ||
package org.testcontainers.junit; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
import org.openqa.selenium.remote.DesiredCapabilities; | ||
import org.testcontainers.containers.BrowserWebDriverContainer; | ||
|
||
/** | ||
* Simple test to check that readiness detection works correctly across major versions of the containers. | ||
*/ | ||
@RunWith(Parameterized.class) | ||
public class Selenium3xTest { | ||
|
||
@Parameterized.Parameters(name = "tag: {0}") | ||
public static String[] data() { | ||
return new String[]{"3.4.0", "2.53.0", "2.45.0"}; | ||
} | ||
|
||
@Parameterized.Parameter() | ||
public String tag; | ||
|
||
@Test | ||
public void testAdditionalStartupString() { | ||
try (BrowserWebDriverContainer chrome = new BrowserWebDriverContainer("selenium/standalone-chrome-debug:" + tag) | ||
.withDesiredCapabilities(DesiredCapabilities.chrome())) { | ||
chrome.start(); | ||
} | ||
} | ||
} |