Skip to content

[web] stop using deprecated jsonwire web-driver protocol - #122560

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
yjbanov:w3c-web-driver
Mar 14, 2023
Merged

auto-submit[bot] merged 3 commits into
flutter:masterfrom
yjbanov:w3c-web-driver

Conversation

@yjbanov

@yjbanov yjbanov commented Mar 13, 2023

Copy link
Copy Markdown
Contributor

Stop using the deprecated jsonwire web-driver protocol. Use the W3C protocol instead.

@flutter-dashboard flutter-dashboard Bot added a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. tool Affects the "flutter" command-line tool. See also t: labels. labels Mar 13, 2023
@yjbanov
yjbanov requested a review from keyonghan as a code owner March 13, 2023 23:55
@yjbanov
yjbanov requested review from ditman and godofredoc March 13, 2023 23:56
@godofredoc

Copy link
Copy Markdown
Contributor

Changes to .ci.yaml file LGTM

@ditman ditman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'chromeOptions' needs to be 'goog:chromeOptions' for tests to run. Otherwise there's an exception when creating the driver (?)

InvalidArgumentException (400): invalid argument: unrecognized capability: chromeOptions
#0      parseW3cResponse (package:webdriver/src/handler/w3c/utils.dart:42:9)
#1      W3cSessionHandler.parseCreateResponse (package:webdriver/src/handler/w3c/session.dart:19:21)
#2      InferSessionHandler.parseCreateResponse (package:webdriver/src/handler/infer_handler.dart:106:34)
#3      AsyncRequestClient.send (package:webdriver/src/common/request_client.dart:96:32)
<asynchronous suspension>
#4      createDriver (package:webdriver/async_core.dart:62:19)
<asynchronous suspension>

Comment thread packages/flutter_tools/test/general.shard/drive/web_driver_service_test.dart Outdated
Comment thread packages/flutter_tools/test/general.shard/drive/web_driver_service_test.dart Outdated
Comment thread packages/flutter_tools/test/general.shard/drive/web_driver_service_test.dart Outdated
Comment thread packages/flutter_tools/lib/src/drive/web_driver_service.dart Outdated

@ditman ditman left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the integration tests in the flutter/packages repository with this change, and everything seems to be passing (at least on Chrome 111):

$ ./script/tool_runner.sh drive-examples --web --exclude=google_sign_in,script/configs/exclude_integration_web.yaml

[... A ton of output ...]

------------------------------------------------------------
Run overview:
  packages/camera/camera - ran
  packages/camera/camera_web - ran
  packages/google_identity_services_web - ran
  packages/google_maps_flutter/google_maps_flutter_web - ran
  packages/image_picker/image_picker - ran
  packages/image_picker/image_picker_for_web - ran
  packages/pointer_interceptor - ran
  packages/shared_preferences/shared_preferences - ran
  packages/shared_preferences/shared_preferences_web - ran
  packages/url_launcher/url_launcher - ran
  packages/url_launcher/url_launcher_web - ran
  packages/video_player/video_player - ran
  packages/video_player/video_player_web - ran
  packages/webview_flutter/webview_flutter_web - ran

Ran for 14 package(s)
Skipped 88 package(s)


No issues found!

(PS: Skipped google_sign_in because I have changes in flight)

@yjbanov

yjbanov commented Mar 14, 2023

Copy link
Copy Markdown
Contributor Author

@ditman Thank you for kicking the tires for this change. Looks like there are good signals that this can stick, so I'm landing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: tests "flutter test", flutter_test, or one of our tests autosubmit Merge PR when tree becomes green via auto submit App framework flutter/packages/flutter repository. See also f: labels. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants