diff --git a/dev/integration_tests/web_e2e_tests/lib/common.dart b/dev/integration_tests/web_e2e_tests/lib/common.dart index 36254d65a2..7e0d3f7106 100644 --- a/dev/integration_tests/web_e2e_tests/lib/common.dart +++ b/dev/integration_tests/web_e2e_tests/lib/common.dart @@ -16,24 +16,15 @@ bool get isFirefox => window.navigator.userAgent.toLowerCase().contains('firefox /// without penetrating the shadow DOM. In the latter case, if the application /// creates platform views, this will also find platform view elements. List findElements(String selector) { - final Element? glassPane = document.querySelector('flt-glass-pane'); - if (glassPane == null) { + final Element? flutterView = document.querySelector('flutter-view'); + + if (flutterView == null) { fail( - 'Failed to locate . Possible reasons:\n' + 'Failed to locate . Possible reasons:\n' ' - The application failed to start' ' - `findElements` was called before the application started' ); } - // TODO(htoor3): Remove shadowRoot selectors once DOM structure PR is merged. - final Element? flutterView = document.querySelector('flutter-view'); - - if(flutterView != null){ - return flutterView.querySelectorAll(selector); - } - - final ShadowRoot? shadowRoot = glassPane.shadowRoot; - return shadowRoot != null - ? shadowRoot.querySelectorAll(selector) - : glassPane.querySelectorAll(selector); + return flutterView.querySelectorAll(selector); } diff --git a/examples/hello_world/test_driver/smoke_web_engine_test.dart b/examples/hello_world/test_driver/smoke_web_engine_test.dart index 7200c3a007..c7dcaa0873 100644 --- a/examples/hello_world/test_driver/smoke_web_engine_test.dart +++ b/examples/hello_world/test_driver/smoke_web_engine_test.dart @@ -43,6 +43,6 @@ void main() { [], ) as WebElement?; expect(fltSemantics, isNotNull); - }, skip: true); // https://github.com/flutter/flutter/issues/124174 + }); }); }