Hi,
I’m trying to automate safari browser and i’m able to do it with simulator. However on real device it’s not working. I have used appium server 1.3.5, 1.4.8, 1.4.13 and 1.5.0-beta8. I have gone through the issues on this forum as well as on git issue log. Didn’t helped much.
Execution steps:
launch ios-webkit-debug-proxy from terminal(installed via brew)
@pr4bh4sh@Priyank_Shah@Mani_Maran_Chandraba I am getting the following error in appium Console while try to run the safari browser inn real devices. I can launch successfully in Simulators:
error: Failed to start an Appium session, err was: Error: ENOENT, stat ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/build/SafariLauncher/SafariLauncher.zip’
info: *************************************
info: *************************************
info: [debug] Configuring Safari session
info: [debug] Using local .zip from command line: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/SafariLauncher/SafariLauncher.zip
info: [debug] Copying local zip to tmp dir
info: [debug] Got configuration error, not starting session
info: [debug] Cleaning up appium session
info: [debug] Error: ENOENT, stat ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/build/SafariLauncher/SafariLauncher.zip’
at Error (native)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: ENOENT, stat ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/build/SafariLauncher/SafariLauncher.zip’)”,“errno”:-2,“code”:“ENOENT”,“path”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/build/SafariLauncher/SafariLauncher.zip",“origValue”:“ENOENT, stat ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/build/SafariLauncher/SafariLauncher.zip’”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 2.984 ms - 498
I guess, you are using appium GUI, i really no idea whether safari launcher app is builded locally while installing Appium GUI. Can u please tried to do same things using appium’s non-GUI (from source or via nam version).
Started os_webkit_debug_proxy -c af5020497b55d10f41a88c488051a85927765a08:27753
Output: Connected :27753 to iPod 5 (af5020497b55d10f41a88c488051a85927765a08)
Started appium – safari
Output: info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {“safari”:true}
info: Console LogLevel: debug
I have ran my code:
Getting Error Output:
rror: Failed to start an Appium session, err was: App zip unzipped OK, but we couldn’t find a .app bundle in it. Make sure your archive contains the .app package and nothing else
info: [debug] undefined
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created.”,“origValue”:“App zip unzipped OK, but we couldn’t find a .app bundle in it. Make sure your archive contains the .app package and nothing else”},“sessionId”:null}
@pr4bh4sh, the same code i ran on real device (8.4 and 9.2), in both case i was able to launch safari and run your code. Just check that you launch ios_debug_proxy with appropriate UDID along with appium server.