-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling press() on control that was not found leads to follow up errors #304
Comments
Additional information: Basically this is a general issue with all methods that are called after a control has not been found / not been successfully initialized. In the case of a press event() it is special, as it causes the above error. But generally, if for example calling a method like "getText()" on a control that was not found, you will get follow up errors like |
thanks for providing detailed insight into failed control localization 👍
want to give it a shot 🤗 ? |
I think the error message is not the main problem. In our environment for some weird reason we have a huge wdio timeout of 2 minutes, that means after a failed control location and invoking press(), we get 2 minutes long the above error message that no control with id undefined can be found. This is distracting a lot from the actual problem, which is correctly reported. I think the code is here. Lines 199 to 201 in 027300e
Could that be improved somehow to not even try finding an element if the control is not initialized? I am not sure how that should be done exactly and at which places, but I assume at least for `press()`` it would be helpful, as looking for an id 'undefined' never makes sense. |
good idea - makes absolute sense, we'll do that 👍 |
resolves #304 * feat: improved error messages - improve the error message output when trying to execute standard functions on an not found control - move the proxy check out of the press event itself and use it in getWebElement() itself * feat: improve fluent async api error output - Log error when control was not found also for fluentAPI Call * feat: add comment to better understand the coding
Describe the bug
I am using the .press() method as mentioned in https://ui5-community.github.io/wdi5/#/usage?id=press
When the control was not found, the press() method keeps on looping (in native wdio until timeout?) and producing errors in the log not finding an "undefined" control:
To Reproduce
Expected behavior
The press method should immediately fail, if the control could not be found instead of trying to look up an element with undefined id.
Logs/Console Output
Runtime Env (please complete the following information):
wdi5/wdio-ui5-service
-version: 0.9.9UI5
version: 1.102.0wdio
-version (output ofwdio --version
): 7.20.5node
-version (output ofnode --version
): v14.19.3The text was updated successfully, but these errors were encountered: