rename test method name
This commit is contained in:
parent
0c231ed0e6
commit
8f3f5cdec1
|
@ -12,18 +12,17 @@ import org.testcontainers.DockerClientFactory;
|
||||||
import org.testcontainers.containers.BrowserWebDriverContainer;
|
import org.testcontainers.containers.BrowserWebDriverContainer;
|
||||||
import org.testcontainers.containers.GenericContainer;
|
import org.testcontainers.containers.GenericContainer;
|
||||||
|
|
||||||
import net.codestory.http.WebServer;
|
|
||||||
|
|
||||||
public class WebDriverContainerTests {
|
public class WebDriverContainerTests {
|
||||||
@Rule
|
@Rule
|
||||||
public BrowserWebDriverContainer chrome = new BrowserWebDriverContainer().withDesiredCapabilities(DesiredCapabilities.chrome());
|
public BrowserWebDriverContainer chrome = new BrowserWebDriverContainer().withDesiredCapabilities(DesiredCapabilities.chrome());
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void when() {
|
public void whenNavigatedToPage_thenHeadingIsInThePage() {
|
||||||
RemoteWebDriver driver = chrome.getWebDriver();
|
RemoteWebDriver driver = chrome.getWebDriver();
|
||||||
driver.get("https://saucelabs.com/test/guinea-pig");
|
driver.get("https://saucelabs.com/test/guinea-pig");
|
||||||
String heading = driver.findElement(By.xpath("/html/body/h1"))
|
String heading = driver.findElement(By.xpath("/html/body/h1"))
|
||||||
.getText();
|
.getText();
|
||||||
assertEquals("This page is a Selenium sandbox", heading);
|
assertEquals("This page is a Selenium sandbox", heading);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue