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: comment out opening a url via deeplink in a new session request #931

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions WebDriverAgentLib/Commands/FBSessionCommands.m
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,20 @@ + (NSArray *)routes
_XCTSetApplicationStateTimeout(defaultTimeout);
}
}
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"17.0") && [bundleID isEqualToString:FB_SAFARI_BUNDLE_ID]) {
// Opening the default URL in Safari instead of an empty page helps
// the remote debugger to avoid issues while looking for active web views
FBWebServerParams *wsParams = FBWebServerParams.sharedInstance;
NSString *healthEndpoint = [NSString stringWithFormat:@"http://127.0.0.1:%@/health", wsParams.port];
id<FBResponsePayload> errorResponse = [self openDeepLink:healthEndpoint
withApplication:bundleID
timeout:capabilities[FB_CAP_APP_LAUNCH_STATE_TIMEOUT_SEC]];
if (nil != errorResponse) {
NSLog(@"Was not able to open the default URL %@ in Safari", healthEndpoint);
}
// Opening a new page in Safari via deeplink as part of new session request could cause
// content load failure and non-response behavior after the new session request for now.
// i.e. https://github.com/appium/appium-xcuitest-driver/pull/2447#issuecomment-2272735187
// if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"17.0") && [bundleID isEqualToString:FB_SAFARI_BUNDLE_ID]) {
// // Opening the default URL in Safari instead of an empty page helps
// // the remote debugger to avoid issues while looking for active web views
// FBWebServerParams *wsParams = FBWebServerParams.sharedInstance;
// NSString *healthEndpoint = [NSString stringWithFormat:@"http://127.0.0.1:%@/health", wsParams.port];
// id<FBResponsePayload> errorResponse = [self openDeepLink:healthEndpoint
// withApplication:bundleID
// timeout:capabilities[FB_CAP_APP_LAUNCH_STATE_TIMEOUT_SEC]];
// if (nil != errorResponse) {
// NSLog(@"Was not able to open the default URL %@ in Safari", healthEndpoint);
// }
}
}
if (!app.running) {
Expand Down
Loading