@@ -103,17 +103,7 @@ public class BrowserWebDriverContainer<SELF extends BrowserWebDriverContainer<SE
103103
104104 public BrowserWebDriverContainer () {
105105 super ();
106- final WaitStrategy logWaitStrategy = new LogMessageWaitStrategy ()
107- .withRegEx (
108- ".*(RemoteWebDriver instances should connect to|Selenium Server is up and running|Started Selenium Standalone).*\n "
109- )
110- .withStartupTimeout (Duration .of (15 , ChronoUnit .SECONDS ));
111-
112- this .waitStrategy =
113- new WaitAllStrategy ()
114- .withStrategy (logWaitStrategy )
115- .withStrategy (new HostPortWaitStrategy ())
116- .withStartupTimeout (Duration .of (15 , ChronoUnit .SECONDS ));
106+ this .waitStrategy = getDefaultWaitStrategy ();
117107
118108 this .withRecordingFileFactory (new DefaultRecordingFileFactory ());
119109 }
@@ -134,17 +124,7 @@ public BrowserWebDriverContainer(DockerImageName dockerImageName) {
134124 super (dockerImageName );
135125 // we assert compatibility with the chrome/firefox/edge image later, after capabilities are processed
136126
137- final WaitStrategy logWaitStrategy = new LogMessageWaitStrategy ()
138- .withRegEx (
139- ".*(RemoteWebDriver instances should connect to|Selenium Server is up and running|Started Selenium Standalone).*\n "
140- )
141- .withStartupTimeout (Duration .of (15 , ChronoUnit .SECONDS ));
142-
143- this .waitStrategy =
144- new WaitAllStrategy ()
145- .withStrategy (logWaitStrategy )
146- .withStrategy (new HostPortWaitStrategy ())
147- .withStartupTimeout (Duration .of (15 , ChronoUnit .SECONDS ));
127+ this .waitStrategy = getDefaultWaitStrategy ();
148128
149129 this .withRecordingFileFactory (new DefaultRecordingFileFactory ());
150130
@@ -453,6 +433,19 @@ public SELF withRecordingFileFactory(RecordingFileFactory recordingFileFactory)
453433 return self ();
454434 }
455435
436+ private WaitStrategy getDefaultWaitStrategy () {
437+ final WaitStrategy logWaitStrategy = new LogMessageWaitStrategy ()
438+ .withRegEx (
439+ ".*(RemoteWebDriver instances should connect to|Selenium Server is up and running|Started Selenium Standalone).*\n "
440+ )
441+ .withStartupTimeout (Duration .of (60 , ChronoUnit .SECONDS ));
442+
443+ return new WaitAllStrategy ()
444+ .withStrategy (logWaitStrategy )
445+ .withStrategy (new HostPortWaitStrategy ())
446+ .withStartupTimeout (Duration .of (60 , ChronoUnit .SECONDS ));
447+ }
448+
456449 public enum VncRecordingMode {
457450 SKIP ,
458451 RECORD_ALL ,
0 commit comments