I managed to restart the same application without restarting its state with Appium 1.3.1, working with Xcode 6.1 on Mac Mini, working with Mavericks. I did not try to run another application between starts. I control automation with C #.
protected AppiumDriver GetAppiumDriver(bool forRestart = false) { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.SetCapability("appium-version", "1.0"); capabilities.SetCapability("platformName", "iOS"); capabilities.SetCapability("platformVersion", "7.1"); capabilities.SetCapability("deviceName", "iPhone Simulator"); capabilities.SetCapability("app", _appPath); capabilities.SetCapability("locationServicesEnabled", true); if (forRestart) { capabilities.SetCapability("noReset", true); } AppiumDriver driver = new AppiumDriver(_serverUrl), capabilities, new TimeSpan(0, 5, 0)); return driver; } public void iOSMobileAppBasicUITest() { // Initially Launch the app with the noReset capability at its default value of false to ensure a clean starting point. _driver = GetAppiumDriver(false); //Shut down the app. _driver.Quit(); // Launch the app again, this time with the noReset capability set to true. _driver = GetAppiumDriver(true); // Use _driver to do whatever UI automation is desired. // Optional: Send the app to the background so that iOS does state preservation. _driver.BackgroundApp(3); // Close the app. _driver.CloseApp(); // Alternative: _driver.Quit(); // Launch the app. _driver.LaunchApp(); // Alternative: _driver = GetAppiumDriver(true); ...
user4195866
source share