File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ Future<void> startChromeDriver() async {
1818 }
1919 });
2020
21- // On windows this takes a while to boot up, wait for the first line
22- // of stdout as a signal that it is ready .
21+ // On windows this takes a while to boot up, wait for a message on stdout
22+ // indicating ChromeDriver started successfully .
2323 final stdOutLines = chromeDriver.stdout
2424 .transform (utf8.decoder)
2525 .transform (LineSplitter ())
@@ -33,7 +33,8 @@ Future<void> startChromeDriver() async {
3333 stdOutLines.listen ((line) => print ('ChromeDriver stdout: $line ' ));
3434 stdErrLines.listen ((line) => print ('ChromeDriver stderr: $line ' ));
3535
36- await stdOutLines.first;
36+ await stdOutLines.firstWhere (
37+ (line) => line.contains ('ChromeDriver was started successfully' ));
3738 } catch (e) {
3839 throw StateError (
3940 'Could not start ChromeDriver. Is it installed?\n Error: $e ' );
You can’t perform that action at this time.
0 commit comments