Skip to content

Commit

Permalink
fix: Wait for the browser to load before continuing the session
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Aug 6, 2024
1 parent 71a697c commit 9345efc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions WebDriverAgentLib/Commands/FBSessionCommands.m
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ + (NSArray *)routes
if (nil != errorResponse) {
NSLog(@"Was not able to open the default URL %@ in Safari", healthEndpoint);
}
NSLog(@"Waiting for %@ to finish loading", healthEndpoint);
// To avoid the race condition while starting the remote debugger
[app fb_waitUntilStableWithTimeout:15.0];
NSLog(@"Load completed: %@", healthEndpoint);
}
}
if (!app.running) {
Expand Down

0 comments on commit 9345efc

Please sign in to comment.