wdi5
wdi5 copied to clipboard
enterText method does not trigger Suggest Event
Describe the bug sap.m.MultiInput have suggestionColumns and suggestionRows aggregations used for tabular input suggestions. Besides this, sap.m.MultiInput has the startSuggestion property used to specify minimum length of the entered text in input before suggest event is fired.
Unfortunately, the suggest event is not triggered after calling the enterText method, respectively the suggestionsm list is not displayed.
The below is my code. I'm just invoking the enterText method
const multiInputSelector = {
selector: {
interaction: "root",
controlType: "sap.m.MultiInput",
properties: {
name: "MultiInputName"
}
}
}
const multiInput = await browser.asControl(multiInputSelector);
await multiInput.enterText(value);
To Reproduce enter text into a MultiInput using enterText method, suggest event is not triggered and suggestion list is not rendered
Expected behavior enter text into a MultiInput using enterText method, suggest event is triggered and suggestion list is rendered
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
Hi @borceacristiann,
thanks for submitting this issue. For enterText
we are using the same functionality that OPA5 uses. So it could be an issue on their side. We will come back to you when we could clarify that.
I just checked it myself and the suggestions are not triggered when we use enterText
. @hmanchev is this something you and your team could look into?
Regards, Simon
Hello @Siolto , @borceacristiann ,
I will take a look and notify you when I have any update.
BR, Hristo
hey 👋 - silence for 30 days 🤐 ... anybody? 😀
hey @hmanchev - were you able to research this?
Hi colleagues,
after sync with OPA colleagues, I can conclude that this is not a bug. enterText is generic action and you can't expect that it will do all the expected events in all ui5 controls.
Actually such functionality (suggestions) could be subject of unit testing. In the case of E2E test, you probably want to automate scenario and just providing proper text should be enough.
Nevertheless, @borceacristiann could you please give more details about the use case or scenario which you want to automate? This will be helpful to extend some documentation and/or propose some solution.
Hi @hmanchev,
I have the following scenario:
-
In the filterbar there is an input that displays a suggestions list only after entering at least 2 characters
-
After entering at least two characters, you can choose an item from the suggestions list in order set a filter value.
Unfortunately, the suggest event is not triggered after calling the enterText method, respectively the suggestion list is not displayed and I cannot select any item from the list.
hey 👋 - silence for 30 days 🤐 ... anybody? 😀
Hi @borceacristiann,
Thanks for the details. I will discuss them with OPA colleagues will see whether we can improve docs. Looking at your scenario. I would recommend you not to seek for covering this suggestion functionality in your E2E test as the suggestions are already covered with different test in many use cases by UI5 controls tests.
Hi @hmanchev, I'm not looking to cover this suggestion function.
I just need the suggestions list to be displayed(after calling the "enterText" method) so that I can select the filter values.
And it is necessary to choose the filter values to fulfill my test case which aims to check if the table can be filtered by multiple values and if it is filtered correctly.
Hi @borceacristiann,
I'm trying to reproduce the issue and so far in my testing the "suggest" event does fire and the dropdown in displayed: https://jsbin.com/kicagezula/1/edit
Do you reproduce the same on the above sample? If yes, can you try to modify it a bit to resemble your setup where the issue can be reproduced?
Thanks
Hi @borceacristiann,
I recalled now that you are reproducing the issue using the wdi5 API, while my sample https://jsbin.com/kicagezula/1/edit uses directly the OPA5 API (namely, the https://sapui5.hana.ondemand.com/#/api/sap.ui.test.actions.EnterText action) to enter the text.
Do you nevertheless see a way to reproduce the issue using the sample at https://jsbin.com/kicagezula/1/edit
or do you reproduce the issue using the wdi5 API only?
Thanks
Hi @kineticjs, this can only be reproduced by writing and running the tests using wdio together with wdi5.
When I manually test the sapui5 application, the suggestions list is displayed properly, respectively the problem is thatentering text into a MultiInput using enterText method is not triggering suggest event and suggestion list is not rendered
@dominikfeininger,
Sample https://jsbin.com/kicagezula/1/edit cannot reproduce the issue in the context of OPA5 only and @borceacristiann commented that so far it is only reproducible when using wdio together with wdi5. Would you look at the issue again from wdi5 side?
Hi @kineticjs,
sorry for the late response. With your snippet I could figure out what the problem is. In this specific case the pressEnterKey
of the EnterText function is missing. By looking further into this, I encountered the problem that in the current state of the RecordReplay API we can not provide any additional information to the RecordReplay.interactWithControl function.
On the one hand wdi5 has to pass more information and on the other hand interactWithControl
has to understand the additional information
press
needs an optional parameter for the interaction
type to be passed.
enterText
needs an optional config object to pass information like clearTextFirst
keepFocus
pressEnterKey
to the recordReplay API.
Maybe it would be good to sync on this topic. @hmanchev and @vobu what do you think?
Maybe it would be good to sync on this topic. @hmanchev and @vobu what do you think?
yes, let's align the APIs also in the core implementation! @hmanchev please send out a meeting request to those concerned. btw: you're clearly on a killer debugging spree here @Siolto 👍 🐛 💯 re-spec-t
Hello, We planned to enhance the API of the RecordReplay.interactWithControl function to allow pass information like keepFocus pressEnterKey, idSuffix. That would allow the display the suggestions list as requested in this issue. We will update when the new implementation is available.
Hello @borceacristiann, which version of UI5 are you using and if it is not latest what are you plans to upgrade? Thanks
Hi @jdichev we are using 1.96.0 UI5 version.
In the near future we do not plan to change the version because according SAPUI5 Versions Maintenance Status 1.96.0 will be maintained until the end of 2024.
Thanks.
hey 👋 - silence for 30 days 🤐 ... anybody? 😀
Hi @kineticjs,
sorry for the late response. With your snippet I could figure out what the problem is. In this specific case the
pressEnterKey
of the EnterText function is missing. By looking further into this, I encountered the problem that in the current state of the RecordReplay API we can not provide any additional information to the RecordReplay.interactWithControl function.On the one hand wdi5 has to pass more information and on the other hand
interactWithControl
has to understand the additional information
press
needs an optional parameter for theinteraction
type to be passed.enterText
needs an optional config object to pass information likeclearTextFirst
keepFocus
pressEnterKey
to the recordReplay API.Maybe it would be good to sync on this topic. @hmanchev and @vobu what do you think?
@hmanchev and @vobu
I ran into another issue where a table row cannot be selected. The reason is because the interaction rowsel
doesn't work properly.
Here, I see that it is already mentioned that the press
function doesn't process the passed interaction
.
Just wanted to add my +1 vote for the resolution of this issue.
Thanks.
Hello Colleagues
I faced an issue, that I am not able to find control by id
and interaction
I send screenshot of my locator:
Thanks
hey 👋 - silence for 30 days 🤐 ... anybody? 😀
closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠
closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠
closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠
reopened live during the wdi5 steering committee :)
Hello @borceacristiann,
Can you give us a reason what prevents you from using a newer version? Unfortunately, the change in OPA was introduced as a new feature with version 1.113 and features are not allowed to be down-ported as per UI5 policy. If newer version cannot be used and down-port cannot be done seems this cannot be solved for version 1.96 and really sorry about it.
Best regards, Jordan