diff --git a/WebDriverAgentLib/Routing/FBSession.m b/WebDriverAgentLib/Routing/FBSession.m index 88d4385f9..69d0fff78 100644 --- a/WebDriverAgentLib/Routing/FBSession.m +++ b/WebDriverAgentLib/Routing/FBSession.m @@ -178,13 +178,13 @@ - (FBApplication *)launchApplicationWithBundleId:(NSString *)bundleIdentifier environment:(nullable NSDictionary *)environment { FBApplication *app = [[FBApplication alloc] initWithBundleIdentifier:bundleIdentifier]; + if (nil == shouldWaitForQuiescence) { + // Iherit the quiescence check setting from the main app under test by default + app.fb_shouldWaitForQuiescence = nil != self.testedApplicationBundleId && self.shouldAppsWaitForQuiescence; + } else { + app.fb_shouldWaitForQuiescence = [shouldWaitForQuiescence boolValue]; + } if (app.fb_state < 2) { - if (nil == shouldWaitForQuiescence) { - // Iherit the quiescence check setting from the main app under test by default - app.fb_shouldWaitForQuiescence = nil != self.testedApplicationBundleId && self.shouldAppsWaitForQuiescence; - } else { - app.fb_shouldWaitForQuiescence = [shouldWaitForQuiescence boolValue]; - } app.launchArguments = arguments ?: @[]; app.launchEnvironment = environment ?: @{}; [app launch];