You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When retrieving row contexts from a UI5 table (e.g. sap.ui.table.AnalyticalTable) via getContexts(0, 1),
calling .getObject() on an individual context fails in wdi5, even though it works correctly in the browser console.
To Reproduce
Steps to reproduce the behavior:
Use wdi5 to retrieve a UI5 Table (e.g. Analytical Table) and its binding:
$> TypeError: singleContext.getObject is not a function
Expected behavior
Calling .getObject() on a binding context retrieved from getContexts() should return the corresponding data object, just like when executing the same code in the browser console.
Logs/Console Output
In wdi5:
$> TypeError: singleContext.getObject is not a function
However, in the browser console, this works correctly:
Workaround
Instead of using .getObject(), fetching the data manually via getProperty() on the table model works:
constrowPath=rowContext[0].sPath;constmodel=awaittable.getModel();constrowData=awaitmodel.getProperty(rowPath);console.log("Workaround:",rowData["TradingContract"]);// ✅ Works
It also works if you embedd the function into a browser.execute()
constresult=awaitbrowser.execute(()=>{consttable=sap.ui.getCore().byId("<tableId>");constbinding=table.getBinding("rows");if(!binding){console.error("❌ Binding not found");returnnull;}// @ts-ignoreconstcontexts=binding.getContexts(0,1);if(contexts.length===0){console.warn("⚠️ No contexts found.");returnnull;}returncontexts[0].getObject();})asany;console.log("🚀 UI5 Table Data:",result);
Screenshots
Runtime Env:
wdi5/wdio-ui5-service-version: 2.0.10
UI5 version: 3.11.5
wdio-version (output of wdio --version): 8.41.0
node-version (output of node --version): v20.18.1
OS: SAP BAS Linux workspace
Browser + Version: Mozilla Firefox (115.9.1esr) and geckodriver 0.36.0
Additional context
Here is some more context that can be included in the bug report to help the maintainers understand the issue better.
🔍 Issue Summary
The issue occurs when trying to use .getObject() on a context retrieved via .getContexts() in wdi5.
The same code works in the browser console but fails in browser.execute() inside wdi5 tests.
This suggests a possible limitation in how wdi5 retrieves objects from UI5 models or a WebdriverIO execution context issue.
💻 WDIO Configuration
capabilities: [{// maxInstances can get overwritten per capability. So if you have an in-house Selenium// grid with only 5 firefox instances available you can make sure that not more than// 5 instances get started at a time.maxInstances: 1,browserName: "firefox","moz:firefoxOptions": {args: ["-headless","--width=1920","--height=1080","--disable-gpu","--no-sandbox",],prefs: {"devtools.console.stdout.content": true// Leitet die Konsole nach stdout}},acceptInsecureCerts: true,"wdi5:authentication": {provider: "BasicAuth",},}],
The text was updated successfully, but these errors were encountered:
thanks for the very detailed description! I will have a look at this in the next few days and check if this is a bug or a limitation we need to communicate.
Describe the bug
When retrieving row contexts from a UI5 table (e.g. sap.ui.table.AnalyticalTable) via getContexts(0, 1),
calling .getObject() on an individual context fails in wdi5, even though it works correctly in the browser console.
To Reproduce
Steps to reproduce the behavior:
$> TypeError: singleContext.getObject is not a function
Expected behavior
Calling .getObject() on a binding context retrieved from getContexts() should return the corresponding data object, just like when executing the same code in the browser console.
Logs/Console Output
In wdi5:
$> TypeError: singleContext.getObject is not a function
However, in the browser console, this works correctly:
Returns:
Workaround
Instead of using .getObject(), fetching the data manually via getProperty() on the table model works:
It also works if you embedd the function into a browser.execute()
Screenshots

Runtime Env:
wdi5/wdio-ui5-service
-version: 2.0.10UI5
version: 3.11.5wdio
-version (output ofwdio --version
): 8.41.0node
-version (output ofnode --version
): v20.18.1Additional context
Here is some more context that can be included in the bug report to help the maintainers understand the issue better.
🔍 Issue Summary
💻 WDIO Configuration
The text was updated successfully, but these errors were encountered: