xCode 8 / iOS 10 / 1.6.0-beta1: Simulator rebooting - FIXED

hi all,

share solution to start work appium with latest xcode 8.0 and simulator 10.0 that worked for me.

  1. install xCode 8.0 and run it manually. Accept agreement.
  2. update appium to ‘npm install -g [email protected]
  3. run needed simulator manually (sometimes it is needed)
  4. reboot machine (just for sure)
  5. install carthage package:
cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
brew install carthage
./Scripts/bootstrap.sh -d

Now simulator stops rebooting in loop on driver start.

  • for sure way i am starting appium:
 appium --log-level error --port 4724 --command-timeout 120 --session-override
  • and capabilities:
Capabilities [{app=/Users/Aleksei/Downloads/test_clients/my.app, noReset=true, newCommandTimeout=120, platformVersion=10.0, automationName=Appium, browserName=, waitForAppScript=$.delay(3000); $.acceptAlert(); true;, version=, deviceName=iPhone 6s, fullReset=false, platform=MAC}]

1 Like

OK

  1. For no. 1 why are you running Xcode 8 manually? usually we just install it and accept agreement right?
  2. For no. 3 do you mean to launch the simulator manually?
    3.Did you have to install anything other than carthage? like realDeviceLogger or idevicesyslog? (I am assuming the xcuitestdriver was installed automatically).

also…is it possible you could paste the sample snippet code of capabilities just so I know? I say that because I thought you had to use capability with automationName=xcuitest…but I don’t see that in your example.

Thanks.

I have not jumped on this train yet, but what are the other callouts? Is there any change to appium methods needed other than driver invocation? Where can i track open issues(probably github?)

Not sure why still need to specify version 1.6.0 if it is merged in appium master already?

@Styris

  1. Xcode just one time run manually after install. Accept Agreement wait it completing installation and close.
  2. Normally very first time i am starting simulator manually (was some problems before. so just old odd). And close.
  3. we do not test automation on real iOS devices. nothing installed more. xcuitestdriver was installed with appium installation.
  4. i did not change ANY capabilities in iOS and changed only one in Android client (waitForAppScript - not supported in 1.6.0-beta1). all iOS capabilities mentioned in post - just scroll it to right.

@hardik_d

  1. I did not run yet all our tests. but first oddness was https://github.com/appium/appium/issues/6866
  2. with appium version you may choose any way to install it :slight_smile:

For me the simulator launches fine, but fails on first command when i try to set_context to WEBVIEW_1 for my safari browser based tests. I am using appium_lib gem version 8.0

@Aleksei i see you using noReset=true, but i need simulator to reset before each test to clear out any cached data, etc. Is there no way to reset sim with xcuitest driver?

@hardik_d
this is one of examples of start. i control this in testNG xml as parameter “devicePlatform” of test. i read it in beforeMethod.

iOS: (due to client specific we do not need fastReset)

        if (devicePlatform.contains("fullReset")) {
            capabilities.setCapability("fullReset", true);
        } else {
            capabilities.setCapability("fullReset", false);
            capabilities.setCapability("noReset", true);
        }

Android:

            if (devicePlatform.contains("fullReset")) { // reinstall client
                capabilities.setCapability(MobileCapabilityType.FULL_RESET, true);
                capabilities.setCapability(MobileCapabilityType.NO_RESET, false);
            } else if (devicePlatform.contains("fastReset")) { // clears cache without reinstall
                capabilities.setCapability(MobileCapabilityType.FULL_RESET, false);
                capabilities.setCapability(MobileCapabilityType.NO_RESET, false);
            } else {
                capabilities.setCapability(MobileCapabilityType.FULL_RESET, false);
                capabilities.setCapability(MobileCapabilityType.NO_RESET, true);
            }