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

fix: Do not throw exception if the app is not in foreground after the timeout #211

Merged
merged 1 commit into from
Sep 8, 2019

Conversation

mykola-mokhnach
Copy link

@mykola-mokhnach mykola-mokhnach commented Sep 7, 2019

It might be that after activation/launch the target application is not in foreground due to alerts.

@mykola-mokhnach mykola-mokhnach merged commit 174bc3b into master Sep 8, 2019
@mykola-mokhnach mykola-mokhnach deleted the wait_app branch September 8, 2019 11:31
Copy link

@santoshkumar-soma santoshkumar-soma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we log the error instead of reporting in case of "No applications are currently active"?

We have a use case where the flow is from native to Web/Safari to download the file. With the Native Session, We are able to recognize the element on Safari to download the profile with the older changes. Due throwing above runt time error "No applications are currently active" , The flow got broken. I have commented in my local able to continue but wanted to push this change as well.

@santoshkumar-soma
Copy link

This is the path, I have commented the blow lines but not sure the impact with the below changes in any other flow.

File:WebDriverAgentLib/FBApplication.m

  • NSString *errMsg = @"No applications are currently active";
  • @throw [NSException exceptionWithName:FBElementNotVisibleException reason:errMsg userInfo:nil];
  • //NSString *errMsg = @"No applications are currently active";
  • //@throw [NSException exceptionWithName:FBElementNotVisibleException reason:errMsg userInfo:nil];

@mykola-mokhnach
Copy link
Author

@santoshkumar-soma Please provide more information on your problem with the exact steps, server log and exception stacktrace. Perhaps, we could find out a better way to solve it

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