wdi5
wdi5 copied to clipboard
Native methods of UI5 aggregation filterGroupItems cannot be invoked for sap.ui.comp.filterbar.FilterBar
Describe the bug Similar to something what is described in this issue, none of the filterGroupItems methods can be used.
FilterBar has an aggregation called filterGroupItems of type sap.ui.comp.filterbar.FilterGroupItem. Each FilterGroupItem has a property called label.
The below is my code. I'm just invoking the getLabel method
const filterBar = await browser.asControl({
selector: {
id: /.*tableId$/,
controlType: "sap.ui.table.Table",
interaction: "root"
},
forceSelect: true
})
const fiterGroupItems = await filterBar.getFilterGroupItems();
const firstLabel = await fiterGroupItems[0].getLabel()
expect(fisrtLabel).toBeTruthy()
This doesn't work, because the native UI5 methods of FilterGroupItem don't seem to be available on each of the items in aggregation. This leads to a type error about missing function
To Reproduce Invoke getLabel on items of filterGroupItems aggregation of FilterBar
Expected behavior The label of the filter item
Logs/Console Output getLabel is not a function
Screenshots
Runtime Env (please complete the following information):
-
wdi5/wdio-ui5-service
-version: 0.9.13 -
UI5
version: 1.96.0 -
wdio
-version: 7.25.0 -
node
-version: 14.17.3 - OS: macOS Monterey 12.6
- Browser + Version: Chrome 106.0.0
Hello, do you have any news related to this issue?
Hi @borceacristiann, sry for late response.
I am litte confused. Your selector indicates you try to select an sap.ui.table.Table
.
Can you please double check the length of the result array of await filterBar.getFilterGroupItems()
so we are sure the elements are retuned in the first place.
Can you please try the shorthand https://ui5-community.github.io/wdi5/#/usage?id=getshorthand-conveniences
await filterBar.getFilterGroupItems(0)
Thank you