Skip to content
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

chore: Catch only NoMatchingViewException, do not swallow AppNotIdleException #589

Merged
merged 4 commits into from
Jul 16, 2020

Conversation

rajdeepv
Copy link
Collaborator

Sometimes, the find_elements take 60 seconds and returns empty results.

This is because app is not idle and we swallow this exception and wait for 60 seconds of a timeout to finish

We must not swallow this AppNotIdleException

@mykola-mokhnach
Copy link
Contributor

I tend to think this is an expected behavior. Where this 60 seconds timeout is set? Is it the implicit timeout?

@rajdeepv
Copy link
Collaborator Author

I don't think. In all other cases apart from findElement, we throw this exception to the user
This 60 second is the timeout in espresso code, maybe coming from here, it can not be changed by Appium user

@mykola-mokhnach
Copy link
Contributor

I don't think. In all other cases apart from findElement, we throw this exception to the user
This 60 second is the timeout in espresso code, maybe coming from here, it can not be changed by Appium user

Yes, this makes sense to me now, thanks for the explanation. Lets only check this exception now. Also, we could add the list of running threads to add more details about what exactly is blocking Espresso (and to make the exception message more helpful):
https://stackoverflow.com/questions/38856136/espresso-test-error-appnotidleexception

@rajdeepv
Copy link
Collaborator Author

Oh yes, good idea. I will do it soon

@mykola-mokhnach mykola-mokhnach changed the title Catch only NoMatchingViewException, do not swallow AppNotIdleException chore: Catch only NoMatchingViewException, do not swallow AppNotIdleException Jul 15, 2020
@KazuCocoa KazuCocoa merged commit 4917d94 into appium:master Jul 16, 2020
@rajdeepv rajdeepv deleted the exception branch July 16, 2020 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants