/*
 * (C) Copyright 2018 Boni Garcia (http://bonigarcia.github.io/)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package io.github.bonigarcia.seljup.test.generic;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.remote.RemoteWebDriver;

import io.github.bonigarcia.seljup.SeleniumJupiter;

@ExtendWith(SeleniumJupiter.class)
class GenericMixedTest {

    @BeforeEach
    void setup() {
        System.setProperty("wdm.defaultBrowser", "chrome-in-docker");
    }

    @AfterEach
    void teardown() {
        System.clearProperty("wdm.defaultBrowser");
    }

    @Test
    void genericMixedTest(ChromeDriver local, RemoteWebDriver remote) {
        exercise(local);
        exercise(remote);
    }

    private void exercise(WebDriver driver) {
        driver.get("https://bonigarcia.github.io/selenium-jupiter/");
        assertThat(driver.getTitle())
                .contains("JUnit 5 extension for Selenium");
    }

}

@@ -734,16 +734,44 @@
 tThat;%0A%0A
+import java.time.Duration;%0A%0A
 import o
@@ -798,24 +798,24 @@
 .AfterEach;%0A
-
 import org.j
@@ -1065,16 +1065,113 @@
 bDriver;
+%0Aimport org.openqa.selenium.support.ui.Wait;%0Aimport org.openqa.selenium.support.ui.WebDriverWait;
 %0A%0Aimport
@@ -1754,87 +1754,205 @@
     
-assertThat(driver.getTitle())%0A                .contains(%22JUnit 5 extension for 
+Wait%3CWebDriver%3E wait = new WebDriverWait(driver,%0A                Duration.ofSeconds(30));%0A        wait.until(d -%3E d.getTitle().contains(%22JUnit 5%22));%0A        assertThat(driver.getTitle()).contains(%22
 Sele

Add explicit wait in generic mixed test