Closed siddharthmlk closed 2 years ago
Hi, Thanks for reporting the issue. We are currently investigating the issue and will come back to you shortly.
Could you please verify, in the debugger, that the property _domId is set?
?
Hi @siddharthmlk, you have to add the viewName to the selector as stated here: https://js-soft.github.io/wdi5/#/locators?id=id-view
Hi,
I tried adding viewName as well, but result is still same and "domId" is coming undefined
Is the project available on github? So, we could take a closer look.
plm-e2e.zip
Attached zip, the baseUrl
refers to internal SAP application, so won't work, here am adding screenshot of similar stuff I did using uiveri5
and it was working
It seems like there is a problem with your config file. When I replaced your config file with my latest one it worked like charme. Could you re-run the setup and check the result? https://js-soft.github.io/wdi5/#/installation?id=reinitialize-setup Also you should ensure, that the baseUrl goes to your app and not to 'https://dev-pl.cfapps.sap.hana.ondemand.com'.
Hello,
This 'https://dev-pl.cfapps.sap.hana.ondemand.com/' is actually the baseUrl which goes to our app to be tested. I am using the same locators that I was previously using with uiveri5 generated using UI5 test recorder tool but not sure what is wrong and _domId is coming undefined
.
Using the very minimal configuration, although if I use 'https://sapui5.hana.ondemand.com/' in baseUrl and try to interact with any control on its landing page, _domId
is getting generated.
See the control below
var templateNavigationLink = await browser.asControl({
selector: {
controlType: "sap.tnt.NavigationListItem",
viewName: "com.sap.clm.sl.cpse.ui.view.App",
bindingPath: {
path: "/navigation/1/items/0",
propertyPath: "title",
modelName: "side"
}
});
templateNavigationLink.click();
the baseUrl
redirects to a Login Page → you've implemented the Login in your wdi5
test, right?
Hi, baseUrl
is referring to internal SAP application and login is implicitly handled in the browser using SSO with my certificate available locally.
ok, but yes and no 😄
yes - I get the cert-based SSO idea
no - wdi5
will start an anonymous, non-profiled browser session. Your certificates won't be available in there. That's why authentication against your app will fail.
Till now chrome was using the certificates to login in non-profiled session, but I disabled the certificate manually from service registry and getting the login option during test run. Since login is non UI5 page, able to submit credentials and it redirects to SAP application. Now, using late injection of wdi5
after successful login await wdioUI5Service.injectUI5();
But post that again the story is same, _domId
is coming undefined for all the controls, although same control is working fine in uiveri5
const navigationLink = await browser.asControl({
selector: {
controlType: "sap.tnt.NavigationListItem",
viewName: "com.sap.clm.sl.cpse.ui.view.App",
bindingPath: {
path: "/navigation/1/items/0",
propertyPath: "title",
modelName: "side"
}
}
});
navigationLink.press(); <---- _domId undefined
logs:
[0-0] RUNNING in chrome - C:\Users\plm-workspace\plm-e2e\test\specs\example.e2e.js
DevTools listening on ws://127.0.0.1:63737/devtools/browser/6567037c-e296-4afd-b98a-e4928dc8944a
[0-0] [wdi5] skipped wdi5 injection!
[59984:49732:0517/201559.498:ERROR:device_event_log_impl.cc(214)] [20:15:59.498] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[59984:49732:0517/201559.498:ERROR:device_event_log_impl.cc(214)] [20:15:59.498] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[59984:49732:0517/201559.537:ERROR:device_event_log_impl.cc(214)] [20:15:59.542] Bluetooth: bluetooth_adapter_winrt.cc:1165 RequestRadioAccessAsync failed: RadioAccessStatus::DeniedByUserWill not be able to change radio power.
[0-0] [wdi5] call of _getControl() failed because of: undefined
[0-0] [wdi5] error retrieving control: sapui.core.Icon{"src":{"regex":{"source":"sys\\-help"}}}
[0-0] [wdi5] call of _getControl() failed because of: undefined
[0-0] [wdi5] error retrieving control: comsap.clm.sl.cpse.ui.view.Appsap.tnt.NavigationListItem{"path":"/navigation/1/items/0","propertyPath":"title","modelName":"side"}
hey 👋 - silence for 30 days 🤐 ... anybody? 😀
i sure hope that with >= v0.9.2
with the better UI5 lifecycle sync has solved this issue
Hi, I am just starting with very basic test scenario like element is visible on homepage for our UI5 based web application. I am always getting
[0-0] [wdi5] call of getControl() failed because of: Error: waitAsync is already running and cannot be called again at this moment [0-0] [wdi5] cpseapp--sideNavigationToggleButton has no sReplFunctionNames
. I looked around the related issues and tried to run some sample test cases available here and there and they seems to work. I am not sure what exactly is missingTo Reproduce 1) I have used the below selector id from the test recorder tool
2) Below is the test script am trying to run
3) wdio.conf.js
Logs/Console Output
Runtime Env (please complete the following information):
wdi5/wdio-ui5-service
-version: 0.9.0-rc4.3UI5
version: 1.90.10wdio
-version (output ofwdio --version
): 7.19.7node
-version (output ofnode --version
): 16.7.0Additional context I also checked for network calls when the web application is loaded in browser, like all of them get resolved as such no pending promise to be resolved. So, am unable to understand the root cause behind it.