Closed ZhanJohnny closed 2 years ago
Hi, thanks for providing detailed context info 👍
Out of the box wdi5
supports selecting FE-like id
s, see https://github.com/js-soft/wdi5/blob/3458b34a8256a9407c4109ec1aea146e6a95dd64/examples/ui5-js-app/webapp/test/e2e/basic.test.js#L14
the error message you provided (waitAsync is already running and cannot be called again at this moment
) hints at a busy UI5/FE app that prevents the RecordReplay
API (that we're using for communicating with the UI5 core) from kicking in.
Any chance that prior to selecting the button you're not awaiting
a navigation step or similar?
Also, please don't use the sap.m.Button
's firePress()
, but the regular .press()
→ https://js-soft.github.io/wdi5/#/usage?id=press
PS: Generic FE support via the "OData v4 test library" is being worked on in #155
Hi @vobu ,
Thanks for your quick reply.
I am not sure how to call the WDI5 test spec after app loaded to fix the message waitAsync is already running and cannot be called again at this moment
.
I just use a simple pause and it works.
await browser.pause(30000)
Do you have better idea to wait for UI5 core loading?
Thanks in advance.
Do you have better idea to wait for UI5 core loading?
this very much depends on your test setup/organization, meaning the logic, oder and sequence of your describe
s and it
s.
could you probably share the test code in question?
Hi Vobu,
Thanks a lot for your help. I would be grateful if you could share some time to check my test spec.
My test spec is in study.spec.js.
Best Regards Johnny
Thanks a lot for your help. I would be grateful if you could share some time to check my test spec. My test spec is in study.spec.js.
Unfortunately we have no access to SAP-internal GitHub hosting. So either you post/publish your test setup here - or we can go into a 1:1 support for your case. Please note that the latter would require you to become a paid sponsor of this project, which results in exclusive support for you.
Hi Vobu,
Oh, I am not ware the you have no access. sorry for that. currently, i use browser.pause for testing and it works. I will close this issue and try to fix it later. Thanks a lot again.
Describe the bug When i try to locate the element generated by FE, it seems it is impossible to get the element.
To Reproduce My code as below:
Expected behavior Should be able to located the create button
**Console log [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] error retrieving control: comsap.ctsm.ui.apps.study::sap.suite.ui.generic.template.ListReport.view.ListReport::Studies--addEntrysap.m.Button
Screenshots if applicable, add screenshots to help explain your problem.
Runtime Env (please complete the following information):
wdi5/wdio-ui5-service
-version: [0.9.0-rc2]UI5
version: [1.97.0]wdio
-version (output ofwdio --version
): [7.16.2]node
-version (output ofnode --version
): [14.18.1]