Appium with IOS

Steps for IOS and Appium

(1)Install Appium 1.6.4 Beta.

(2)Go to the directory /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent and issue the below commands:

     brew install ideviceinstaller

     npm install -g iso-deploy

     npm install -g iso-deploy

     sudo npm -g install ios-deploy –unsafe-perm=true

     brew install carthage

     npm install -g deviceconsole

     sudo gem install xcpretty

     mkdir -p Resources/WebDriverAgent.bundle

     bash Scripts/bootstrap.sh -d

   94  brew install carthage

   95  brew link carthage

   96  brew uninstall -g carthage

   97  brew install  carthage

   98  brew link –overwrite carthage

   99  bash Scripts/bootstrap.sh -d

Java code:

/**

*

*/

package com.webdriver.ltree.tests.OfferPage;

import java.net.MalformedURLException;

import java.net.URL;

import org.openqa.selenium.remote.DesiredCapabilities;

import org.testng.annotations.BeforeMethod;

import org.testng.annotations.Test;

import io.appium.java_client.AppiumDriver;

import io.appium.java_client.ios.IOSDriver;

import io.appium.java_client.remote.MobileCapabilityType;

/**

* @author ANIMBALKAR

*

*/

public class TestNative {

private AppiumDriver driver;

@Test

public void setUp() throws MalformedURLException

{

DesiredCapabilities capabilities=DesiredCapabilities.iphone();

capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,”Jeffrey A’s iPhone”);

capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,”iOS”);

//capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,”10.2.1″);

capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,”10.2.1″);

capabilities.setCapability(“udid”, “4fa2db71161d1d05bb4db2474166cc8702464e45”);

capabilities.setCapability(“xcodeOrgId”, “6875V85G6L”);

capabilities.setCapability(“xcodeSigningId”, “iPhone Developer”);

capabilities.setCapability(“bundleId”, “com.lendingtree.mylendingtree”);

capabilities.setCapability(“xcodeConfigfile”, “config.xcconfig”);

capabilities.setCapability(“app”, “/Users/ANIMBALKAR/Downloads/Money_Center.QA.ipa”);

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

driver.quit();

}

}

Start Appium from command prompt as below :

appium –app /Users/ANIMBALKAR/Downloads/Money_Center.QA.ipa -U 4fa2db71161d1d05bb4db2474166cc8702464e45

Advertisements

About qainterviews

Software Geek,QA Expert,Blogger
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s