Steps to get ipad / iphone connecting to appium

937 views
Skip to first unread message

nfv

unread,
Jul 31, 2013, 11:22:02 AM7/31/13
to appium-...@googlegroups.com
Hi

Ive been looking for instructions on how to attach my ipad / iphone to appium to run selenium tests on a website in safari. All the guides seem to be relating to running actual apps however. I have absolutely no experience of apple development, but have managed to connect appium to my selenium grid and run the tests on ipad and iphone simulator, just not the actual hardware. Can anyone point me in the right direction? I realise its a lot to ask, but just some pointers of the steps ill need to go through to get the devices connected to the mac/appium would be great, then i can research how to do them in greater detail. I do have access to an apple developer account, if that is needed.

Many Thanks
NFV

Dan Cuellar

unread,
Jul 31, 2013, 11:23:37 AM7/31/13
to appium-...@googlegroups.com
https://github.com/appium/appium/blob/master/docs/real-devices.md

The gist is, get you iOS device setup for development and if you give the --UDID flag and the bundleID with the --app flag all is well.

For android, just plug in a device setup for debugging and it works.

nfv

unread,
Jul 31, 2013, 11:35:59 AM7/31/13
to appium-...@googlegroups.com
OK think i found an ad-hoc provisioning profile which im trying to add to the ipad. I have the udid, but as i dont have an app locally (i just need to run safari on the ipad) should i omit that --app argument? Also can these arguments be passed as capabilities from my junit code?

Cheers
NFV

Dan Cuellar

unread,
Jul 31, 2013, 11:43:53 AM7/31/13
to appium-...@googlegroups.com
Yes they can be passed as capabilities. You need a development/debug certificate I believe. I don't think ad-hoc will work, but I could be wrong.

nfv

unread,
Jul 31, 2013, 12:05:17 PM7/31/13
to appium-...@googlegroups.com
I created and installed a development profile, and am runnint the test with the capabilities: 

udid: [the udid]
version: 6.1
app: safari

I get the INFO message: Failed to start instruments daemon for 'iOS' on 'My Ipad (v6.1.3)' (The service is invalid.)

Meanwhile appium is still opening the ipad simulator rather than using the ipad, any ideas what else i could have missed?

Cheers
NFV

Dan Cuellar

unread,
Jul 31, 2013, 12:44:30 PM7/31/13
to appium-...@googlegroups.com
If it launched the sim that would likely indicate that the --udid flag was not supplied

nfv

unread,
Aug 1, 2013, 4:47:09 AM8/1/13
to appium-...@googlegroups.com
I have supplied the --udid flag and also specified the udid in capabilities. Im getting the following:

info: Attempting to run app on real device with UDID 5cd4ba2c19000bdbae5d0f7018fe161bea0b4b34
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Users/bangordevelopment/node_modules/appium/app/uiauto/Automation.tracetemplate -w 5cd4ba2c19000bdbae5d0f7018fe161bea0b4b34 /tmp/Appium-MobileSafari.app -e UIASCRIPT /Users/bangordevelopment/node_modules/appium/app/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/ff892f3a-6fd1-4f16-be69-51a445613826
info: And extra without-delay env: {}
info: [INST STDERR] 2013-08-01 09:44:35.448 instruments[8072:5203] Exception encountered during 'hardwareInformation' dispatch: Selector 'hardwareInformation' not authorized for type 'DTDeviceInfoService'

info: [INST STDERR] 2013-08-01 09:44:35.519 instruments[8072:3303] Error fetching kdebug events

At this point the simulator fires up. Should it fall back to the simulator if the real device connection fails?

Cheers
NFV

nfv

unread,
Aug 1, 2013, 4:53:10 AM8/1/13
to appium-...@googlegroups.com
Also noticed in the ipad console in xcode the following:

Aug  1 09:50:28 Bangor-Developments-iPad lockdownd[45] <Notice>: 002c1000 set_response_error: handle_start_session SessionActive
Aug  1 09:50:28 Bangor-Developments-iPad lockdownd[45] <Notice>: 002c1000 set_response_error: handle_start_session SessionActive
Aug  1 09:50:28 Bangor-Developments-iPad lockdownd[45] <Notice>: 002c1000 spawn_service_agent: Could not look up service in the map
Aug  1 09:50:28 Bangor-Developments-iPad lockdownd[45] <Notice>: 002c1000 spawn_and_handle_checkin: Could not spawn the com.apple.instruments.remoteserver service agent:InvalidService 
Aug  1 09:50:28 Bangor-Developments-iPad DTMobileIS[19157] <Warning>: Warning: Selector 'hardwareInformation' not authorized for type 'DTDeviceInfoService'

Any idea what com.apple.instruments.remoteserver is?

Dan Cuellar

unread,
Aug 1, 2013, 11:08:19 AM8/1/13
to appium-...@googlegroups.com
This might indicate that you might not have Xcode installed on this machine. Or possibly the XCode Command Line Tools are missing.

Dan Cuellar

unread,
Aug 1, 2013, 11:09:07 AM8/1/13
to appium-...@googlegroups.com
I would try a reinstall of XCode since previous output doesn't seem to indicate that you are missing it. The install might be messed up.

SCBhupen

unread,
Aug 1, 2013, 11:18:17 AM8/1/13
to appium-...@googlegroups.com, Dan Cuellar
That's true, I faced the similar situation , and after installing command line tool in Xcode .. reset work perfectly with UICatalog code.

below is screenshot.


Thanks
Bhupen




On Aug 1, 2013, at 11:09 AM, Dan Cuellar <dancu...@gmail.com> wrote:

I would try a reinstall of XCode since previous output doesn't seem to indicate that you are missing it. The install might be messed up.

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages