Search in sources :

Example 1 with ConditionFactory

use of org.awaitility.core.ConditionFactory in project selenium-webdriver-java by bonigarcia.

the class DownloadChromeJupiterTest method testDownloadChrome.

@Test
void testDownloadChrome() {
    driver.get("https://bonigarcia.dev/selenium-webdriver-java/download.html");
    driver.findElement(By.xpath("(//a)[2]")).click();
    driver.findElement(By.xpath("(//a)[3]")).click();
    ConditionFactory await = Awaitility.await().atMost(Duration.ofSeconds(5));
    File wdmLogo = new File(targetFolder, "webdrivermanager.png");
    await.until(() -> wdmLogo.exists());
    File wdmDoc = new File(targetFolder, "webdrivermanager.pdf");
    await.until(() -> wdmDoc.exists());
}
Also used : ConditionFactory(org.awaitility.core.ConditionFactory) File(java.io.File) Test(org.junit.jupiter.api.Test)

Example 2 with ConditionFactory

use of org.awaitility.core.ConditionFactory in project selenium-webdriver-java by bonigarcia.

the class DownloadChromeSelJupTest method testDownloadChrome.

@Test
void testDownloadChrome(ChromeDriver driver) {
    driver.get("https://bonigarcia.dev/selenium-webdriver-java/download.html");
    driver.findElement(By.xpath("(//a)[2]")).click();
    driver.findElement(By.xpath("(//a)[3]")).click();
    ConditionFactory await = Awaitility.await().atMost(Duration.ofSeconds(5));
    File wdmLogo = new File(targetFolder, "webdrivermanager.png");
    await.until(() -> wdmLogo.exists());
    File wdmDoc = new File(targetFolder, "webdrivermanager.pdf");
    await.until(() -> wdmDoc.exists());
}
Also used : ConditionFactory(org.awaitility.core.ConditionFactory) File(java.io.File) Test(org.junit.jupiter.api.Test)

Example 3 with ConditionFactory

use of org.awaitility.core.ConditionFactory in project selenium-webdriver-java by bonigarcia.

the class DownloadFirefoxSelJupTest method testDownloadFirefox.

@Test
void testDownloadFirefox(FirefoxDriver driver) {
    driver.get("https://bonigarcia.dev/selenium-webdriver-java/download.html");
    driver.findElement(By.xpath("(//a)[2]")).click();
    driver.findElement(By.xpath("(//a)[3]")).click();
    ConditionFactory await = Awaitility.await().atMost(Duration.ofSeconds(5));
    File wdmLogo = new File(targetFolder, "webdrivermanager.png");
    await.until(() -> wdmLogo.exists());
    File wdmDoc = new File(targetFolder, "webdrivermanager.pdf");
    await.until(() -> wdmDoc.exists());
}
Also used : ConditionFactory(org.awaitility.core.ConditionFactory) File(java.io.File) Test(org.junit.jupiter.api.Test)

Example 4 with ConditionFactory

use of org.awaitility.core.ConditionFactory in project selenium-webdriver-java by bonigarcia.

the class DownloadChromeNGTest method testDownloadChrome.

@Test
public void testDownloadChrome() {
    driver.get("https://bonigarcia.dev/selenium-webdriver-java/download.html");
    driver.findElement(By.xpath("(//a)[2]")).click();
    driver.findElement(By.xpath("(//a)[3]")).click();
    ConditionFactory await = Awaitility.await().atMost(Duration.ofSeconds(5));
    File wdmLogo = new File(targetFolder, "webdrivermanager.png");
    await.until(() -> wdmLogo.exists());
    File wdmDoc = new File(targetFolder, "webdrivermanager.pdf");
    await.until(() -> wdmDoc.exists());
}
Also used : ConditionFactory(org.awaitility.core.ConditionFactory) File(java.io.File) Test(org.testng.annotations.Test)

Example 5 with ConditionFactory

use of org.awaitility.core.ConditionFactory in project selenium-webdriver-java by bonigarcia.

the class DownloadFirefoxNGTest method testDownloadFirefox.

@Test
public void testDownloadFirefox() {
    driver.get("https://bonigarcia.dev/selenium-webdriver-java/download.html");
    driver.findElement(By.xpath("(//a)[2]")).click();
    driver.findElement(By.xpath("(//a)[3]")).click();
    ConditionFactory await = Awaitility.await().atMost(Duration.ofSeconds(5));
    File wdmLogo = new File(targetFolder, "webdrivermanager.png");
    await.until(() -> wdmLogo.exists());
    File wdmDoc = new File(targetFolder, "webdrivermanager.pdf");
    await.until(() -> wdmDoc.exists());
}
Also used : ConditionFactory(org.awaitility.core.ConditionFactory) File(java.io.File) Test(org.testng.annotations.Test)

Aggregations

ConditionFactory (org.awaitility.core.ConditionFactory)11 File (java.io.File)9 Test (org.junit.Test)4 Test (org.junit.jupiter.api.Test)4 Test (org.testng.annotations.Test)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 DockerClient (com.github.dockerjava.api.DockerClient)1 Duration (java.time.Duration)1 List (java.util.List)1 Map (java.util.Map)1 Consumer (java.util.function.Consumer)1 Collectors (java.util.stream.Collectors)1 Stream (java.util.stream.Stream)1 SneakyThrows (lombok.SneakyThrows)1 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)1 Awaitility (org.awaitility.Awaitility)1 DefaultMessage (org.hyperledger.besu.ethereum.p2p.rlpx.wire.DefaultMessage)1 MessageData (org.hyperledger.besu.ethereum.p2p.rlpx.wire.MessageData)1 Assert.assertEquals (org.junit.Assert.assertEquals)1 DockerClientFactory (org.testcontainers.DockerClientFactory)1