[Tutorial and Stats] Safari Automation on real/physical Device

Hi everyone,

I was going through the issue logged in this forum for automation the safari browser on real device, as i was also facing same issue. Finally i’m able to automate safari browser.
Config: Appium 1.5.0-beta8+Xcode7.1(&B91b)

These are the device devices used:

  1. iPhone 6 Plus - iOS 8.2(12D508) - works fine.
  2. iPhone 6 - iOS 9.1(13B143) - works fine
  3. iPhone 5 - iOS 8.1.3(12B466) - works fine
  4. iPhone 5 - iOS 8.1(12B411) - works fine
  5. iPhone 4 - iOS 7.1.2(11D257) - works fine
  6. iPhone 4 - iOS 6.0.1(10A523) - works fine

Things you should absolutely do not forget while automating safari browser

  1. Enable UiAutomation in required device.
  2. Enable Web inspector for safari in settings.
  3. Start the ios_webkit_debug_proxy from terminal with ios_webkit_debug_proxy -c <UDID>:27753 -d
  4. Start appium server appium --safari
    Sample java code here

P.S. Thanks @Priyank_Shah,@Mani_Maran_Chandraba for the help.

3 Likes

Is it possible for u to document the steps with screenshots … that will help…
Currently I am working only on simulator for iOS Hybrid app …
Thanks in advance

Just for curiosity, wanted to know ios_debug_webkit_proxy requires to debug web view for hybrid app?

@Priyank_Shah

Yes absolutely, ios_debug_webkit_proxy is needed when we try to switch between NATIVE_VIEW and WEB_VIEW.

Hi @pr4bh4sh,

Awesome job :slightly_smiling: could u plz help me to get Appium 1.5.0-beta8. I have got source code of it. but am not able to use it . how can i used it though GUI mode or Non GUI mode. I hope either anyone of this we need to use Appium 1.5.0-beta8 could you please provide the step.

here without SafariLauncher we are automating safari browser ?

Thanks in Advance.

I’ll be making this a well stepped tutorial(work and holidays not making this easy). @amitjaincoer191 thanks for pointing it out.
for now to get 1.5.0-beta8 i have installed it from npm
npm -g install [email protected]

Safari launcher(xcode project) is inside the appium, appium itself will handle the safailauncher ipa building and installation prior to automation on the device.

Note:- you may need to reset the appium so the safari launcher app will be build with you provisioning profile, I didn’t required for me however it work without resetting.

@pr4bh4sh i tried to install [email protected] get few error

finally i can’t able to find safariLauncher in that folder

I have created manually SafariLauncher folder under appium 1.5.0 and copied safariLauncher.app into that

still safariLauncher is not lunching

could you please give me more info about reset appium what you mentioned in previous reply.

looking forward for your reply Thanks in advance.