[web] increase chromedriver logging level (#147687)

This can help debugging https://github.com/flutter/flutter/issues/146189
This commit is contained in:
Yegor 2024-05-02 10:16:37 -07:00 committed by GitHub
parent da05147d6a
commit 1d0e798c21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -732,7 +732,7 @@ class WebTestsSuite {
// and it doesn't use most of startCommand's features; we could simplify this a lot by
// inlining the relevant parts of startCommand here.
'chromedriver',
<String>['--port=4444'],
<String>['--port=4444', '--log-level=INFO', '--enable-chrome-logs'],
);
while (!await _isChromeDriverRunning()) {
await Future<void>.delayed(const Duration(milliseconds: 100));
@ -744,7 +744,8 @@ class WebTestsSuite {
final Uri chromeDriverUrl = Uri.parse('http://localhost:4444/status');
final HttpClientRequest request = await client.getUrl(chromeDriverUrl);
final HttpClientResponse response = await request.close();
final Map<String, dynamic> webDriverStatus = json.decode(await response.transform(utf8.decoder).join()) as Map<String, dynamic>;
final String responseString = await response.transform(utf8.decoder).join();
final Map<String, dynamic> webDriverStatus = json.decode(responseString) as Map<String, dynamic>;
client.close();
final bool webDriverReady = (webDriverStatus['value'] as Map<String, dynamic>)['ready'] as bool;
if (!webDriverReady) {