ui5-community / wdi5

official UI5 end-to-end test framework for UI5 web-apps. wdi5 = Webdriver.IO + UI5 Test API
https://ui5-community.github.io/wdi5/
Apache License 2.0
102 stars 43 forks source link

Fetch multiple elements ($$) #115

Closed adrianna-u closed 2 years ago

adrianna-u commented 2 years ago

Hi,

is this possible to select multiple elements in wdi5? (Similar to wdio $$ notation and uiveri5 element.all feature)

We are using following locators in UIVeri5 and looking for a replacement

 element.all(by.control({
   controlType: 'sap.m.Title'
}))

or WDIO

get allTitles_WDIO() { return $$('.sapMTitle')}

Thanks Adrianna

vobu commented 2 years ago

hi, there's no api yet for selecting all controls of a certain type in wdi5. but i'm labelling this as enhancement/feature request - so once we can actually make a public road map (don't ask), it'll be on the dev plan

maximnaidenov commented 2 years ago

"I have a dream" - WDIO custom locator e.g. $ui5({selector:{}}) similar to $react(), then all other things (chaining, methods) will "just work"

vobu commented 2 years ago

"I have a dream" - WDIO custom locator e.g. $ui5({selector:{}}) similar to $react(), then all other things (chaining, methods) will "just work"

let's see what we can do to fulfill your dreams ☁️ 😺

vobu commented 2 years ago

support

as criteria for a "select all"

eventually "all descendants/ancestors of" ?

vobu commented 2 years ago

just to provide an update here @adrianna-u: we've discussed different approaches and are about to prototype some. there will for sure be an implementation until ~ end of the month (Mar 22), going into the regular 0.9.0 release

dominikfeininger commented 2 years ago

https://sapui5.hana.ondemand.com/sdk/#/api/sap.ui.test.RecordReplay%23methods/sap.ui.test.RecordReplay.findAllDOMElementsByControlSelector

vobu commented 2 years ago

closed via #212, documented at https://js-soft.github.io/wdi5/#/usage?id=allcontrols and (will be) part of the rc4-release!