Replace findInShadowRoot() calls with TestBench Element Queries
See original GitHub issueFlow’s own implementation in TestBenchHelpers
for finding elements inside shadow dom does not work for polyfilled browsers, because of https://github.com/SeleniumHQ/selenium/issues/5470
With TestBench 6 queries we don’t need that helper method anymore, as the queries also find elements inside shadow dom:
LabelElement labelInShadow = $(DivElement.class)
.id("element-with-shadow").$(LabelElement.class)
.id("label-in-shadow");
and it should avoid the issue with polyfills (need to check if it fixes some IE11 tests)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Querying Elements | Creating Tests | TestBench | Vaadin 7 Docs
The query returns a list of HTML elements of all the Button components in the UI. Every Vaadin component has its corresponding element...
Read more >java - How to wait for an element to appear or disappear using ...
first().click();. My question is how to wait until 'OpenProcessedDocument' button is displayed using vaadin testbench element query API.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Splited out:
getInShadowRoot():
java/com/vaadin/flow/uitest/ui/template/RouterLinksIT.java com/vaadin/flow/uitest/ui/template/collections/ClearListIT.java java/com/vaadin/flow/uitest/ui/template/collections/ListBindingIT.java com/vaadin/flow/uitest/ui/template/collections/ListInsideListBindingIT.java com/vaadin/flow/uitest/ui/template/imports/LazyWidgetIT.java java/com/vaadin/flow/uitest/ui/template/UpgradeElementIT.java com/vaadin/flow/uitest/ui/template/UpdatableModelPropertiesIT.java com/vaadin/flow/uitest/ui/template/TwoWayPolymerBindingIT.java com/vaadin/flow/uitest/ui/template/TemplatesVisibilityIT.java com/vaadin/flow/uitest/ui/template/TemplateInTemplateWithIdIT.java com/vaadin/flow/uitest/ui/template/TemplateInTemplateIT.java vaadin/flow/uitest/ui/template/TemplateHasInjectedSubTemplateIT.java java/com/vaadin/flow/uitest/ui/template/SubPropertyModelIT.java com/vaadin/flow/uitest/ui/template/RestoreViewWithAttachedByIdIT.java com/vaadin/flow/uitest/ui/template/PropertiesUpdatedBeforeChangeEventsIT.java com/vaadin/flow/uitest/ui/template/PolymerPropertyMutationInObserverIT.java com/vaadin/flow/uitest/ui/template/PolymerPropertyChangeEventIT.java com/vaadin/flow/uitest/ui/template/PolymerPropertiesIT.java com/vaadin/flow/uitest/ui/template/PolymerModelPropertiesIT.java com/vaadin/flow/uitest/ui/template/PolymerDefaultPropertyValueIT.java
findInShadowRoot():
com.vaadin.flow.uitest.ui.frontend.FrontendProtocolIT com/vaadin/flow/uitest/ui/template/collections/TwoWayListBindingIT.java com/vaadin/flow/uitest/ui/template/collections/ModelListIT.java com/vaadin/flow/uitest/ui/template/collections/ListInsideListBindingIT.java com/vaadin/flow/uitest/ui/template/collections/ListBindingIT.java com/vaadin/flow/uitest/ui/template/collections/ClearListIT.java com/vaadin/flow/uitest/ui/template/TemplateWithConnectedCallbacksIT.java com/vaadin/flow/uitest/ui/template/TemplateMappingDetectorIT.java com/vaadin/flow/uitest/ui/template/InjectScriptTagIT.java com/vaadin/flow/uitest/ui/template/ClearNodeChildrenIT.java com/vaadin/flow/uitest/ui/template/ChildOrderIT.java com/vaadin/flow/uitest/ui/template/BeanInListingIT.java com/vaadin/flow/uitest/ui/template/BasicTypeInListIT.java
Those can be taken by someone else.
the left part are done : https://github.com/vaadin/flow/pull/4301