I am going to write about “How you can install the framework of safari to run appium tests”. If you need run tests in safari of real devices with Appium, you can use this framework for ios devices (Android it is more easier as always). So, you need to have an apple developer account.
-> Plug your device
-> Git clone this project: https://github.com/budhash/SafariLauncher
-> Add your device in your developer apple register.
-> Download your certificate and your mobile provisioning profile after
-> Install your mobile provision in your device (or double touch on the file)
-> Put in blundle id com.safariLauncher.safariLauncher -> inside of the general properties of the project
-> Check if you are deploying in the right version of ios.
-> Run the project
-> Don’t forget to set the capabilities in your automation project:
DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("appium-version", "1.3.1"); capabilities.setCapability("platformName", "iOS"); capabilities.setCapability("deviceName", "Tahir's iPhone"); capabilities.setCapability("udid", "your_udid"); capabilities.setCapability("bundleId", bundle); capabilities.setCapability("browserName", "safari"); driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); driver.get("http://www.google.com"); Thread.sleep(20000);
Once you have deployed the safari launcher to the device, everything should be configured correctly so that the next time you run ./reset.sh on appium, the installation of the safari launcher app should succeed.
See you next week !