Skip to content

Webdriver can't return shadowRoot (as SearchContext) in Chrome96+ #247

Description

@ditman

We're attempting to run some tests in Chrome96, and this bit of the code is failing:

https://github.com/flutter/flutter/blob/5e0cc4cba416866225821c0eaba581ac7c0a712c/examples/hello_world/test_driver/smoke_web_engine_test.dart#L46-L50

With the following error (complete build):

   type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'SearchContext?' in type cast
   test_driver/smoke_web_engine_test.dart 50:9       main.<fn>.<fn>
   ===== asynchronous gap ===========================
   package:test_api/src/backend/declarer.dart 215:9  Declarer.test.<fn>.<fn>
   ===== asynchronous gap ===========================
   package:test_api/src/backend/declarer.dart 213:7  Declarer.test.<fn>
   ===== asynchronous gap ===========================
   package:test_api/src/backend/invoker.dart 257:7   Invoker._waitForOutstandingCallbacks.<fn>

It seems that there has been a change in how Chrome 96+ retrieves the shadowRoot of an element.

Looking at the equivalent fix in Selenium, it seems that some of the changes need to happen in package:webdriver?


Copied from flutter/flutter#99775

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions