简体   繁体   中英

Appium 1.4 on Real iPhone Device

Can anyone tell me the steps to run Appium on real iPhone device

I have downloaded Appium 1.4

DesiredCapabilities capabilities = new DesiredCapabilities();

    capabilities.setCapability("platformVersion", "8.1.2");
    capabilities.setCapability("platformName", "iOS");
    capabilities.setCapability("device", "iPhone");
    capabilities.setCapability("deviceName", "Maitri acharya");
    //capabilities.setCapability("browserName", "safari");

    String path = System.getProperty("user.dir")+"/UICatalog.app";
    System.out.println(path);
    File app = new File(path);
    capabilities.setCapability("app", app.getAbsolutePath());

    driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

I have set up bundleID and UDID defined in Appium setting

I came across few links about cloning Safari launcher and as ios-webkit-debug-proxy-launcher.js but I am not still clear on steps...

Thanks in advance

I get following error

: setupDesireCapabilitiesMobile org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: ENOENT, stat '/Applications/Appium.app/Contents/Resources/node_modules/appium/build/SafariLauncher/SafariLauncher.zip') (WARNING: The server did not provide any stacktrace information) Comman

I know it was a month ago you posted but hopefully I can help someone else. I got the same error today. It turned out there was no SafariLauncher.zip on that path.

I solved it by downloading SafariLauncher from github: https://github.com/budhash/SafariLauncher

Then running the script in build.sh from the terminal, which creates a SafariLauncher.zip file. An then adding this zip file in the correct place.

I found this answer here: https://discuss.appium.io/t/error-installing-safari-launcher-on-real-device-appium-v1-3-7/3793

Do you test on real device? Did you unlock Web Inspector in:

your iPhone -> Settings -> Safari -> Advanced -> Web Inspector: on ?

I was able to get over this error executing the following in the Appium folder:

./reset.sh --ios --real-safari

This was explained on this bug report: https://github.com/appium/appium-dot-app/issues/513

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM