Web testing on real iOS devices

Hello!
I’m unable to get web testing on real iPhone despite trying lots of things already:
My setup:

OS X Maverics 10.9.5
Appium 1.3.0 installed with npm.

According to the documentation all I have to do is put “browserName” to “Safari” and SafariLauncher will start:

capabilities.setCapability("deviceName", "<device_id>");
capabilities.setCapability("udid", "<device_id>");
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", "8.1");

This is what get:
http://pastebin.com/MiP4tJhi

The peculiar thins is that it first checks if SafariLauncher is installed (which it is):

Checking app install status using: /Users/ios/.testobject_devices/work/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 68c7d5704a1ed07f4b6f7e6eb4018094f05fa529 --bundle com.bytearc.SafariLauncher

and then runs instrumentation against MobileSafari:

Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w 68c7d5704a1ed07f4b6f7e6eb4018094f05fa529 com.apple.mobilesafari -e UIASCRIPT "/Users/ios/Library/Application Support/appium/bootstrap/bootstrap-de44ffe1afa36603.js" -e UIARESULTSPATH /tmp/appium-instruments

Also in the beginning it says in the logs:

info: [debug] Using mobile safari app at /tmp/Appium-MobileSafari-8.1.app

Which is as I understand for simulators.
It seems like Appium is confused whether it’s a Simulator or a real device.

Is it a bug or I’m just not setting the correct desired capabilities?

Leonti

P.S. I of course tried to use SafariLauncher directly with:

 capabilities.setCapability("app", "/Users/ios/.testobject_devices/work/node_modules/appium/build/SafariLauncher/SafariLauncher.zip");

Safari is starting, but stuff like:

driver.get("https://google.com");

which is understandable since Appium doesn’t know that it’s a web testing.

1 Like

Do you think this is the same issue described here: https://github.com/appium/appium-adb/blob/2f10e1392124e26dbde27638a55656835273f912/lib/adb.js#L1116

Sounds like a bug. Can you post is to the appium github repo?

Github issue just for the reference: https://github.com/appium/appium/issues/3889