1313import org .testcontainers .containers .wait .strategy .HttpWaitStrategy ;
1414import org .testcontainers .utility .DockerImageName ;
1515
16- import java .util . concurrent . TimeUnit ;
16+ import java .time . Duration ;
1717
1818import static org .assertj .core .api .Assertions .assertThat ;
1919
@@ -36,7 +36,7 @@ public class BaseWebDriverContainerTest {
3636
3737 protected static void doSimpleExplore (BrowserWebDriverContainer <?> rule , Capabilities capabilities ) {
3838 RemoteWebDriver driver = new RemoteWebDriver (rule .getSeleniumAddress (), capabilities );
39- driver .manage ().timeouts ().implicitlyWait (30 , TimeUnit . SECONDS );
39+ driver .manage ().timeouts ().implicitlyWait (Duration . ofSeconds ( 30 ) );
4040 System .out .println ("Selenium remote URL is: " + rule .getSeleniumAddress ());
4141 System .out .println ("VNC URL is: " + rule .getVncAddress ());
4242
@@ -52,7 +52,7 @@ protected static void doSimpleExplore(BrowserWebDriverContainer<?> rule, Capabil
5252 protected void assertBrowserNameIs (BrowserWebDriverContainer <?> rule , String expectedName ) {
5353 Capabilities capabilities = ("chrome" .equals (expectedName )) ? new ChromeOptions () : new FirefoxOptions ();
5454 RemoteWebDriver driver = new RemoteWebDriver (rule .getSeleniumAddress (), capabilities );
55- driver .manage ().timeouts ().implicitlyWait (30 , TimeUnit . SECONDS );
55+ driver .manage ().timeouts ().implicitlyWait (Duration . ofSeconds ( 30 ) );
5656 String actual = driver .getCapabilities ().getBrowserName ();
5757 assertThat (actual ).as (String .format ("actual browser name is %s" , actual )).isEqualTo (expectedName );
5858 driver .quit ();
0 commit comments