APPIUM – MAC Installation for iOS

APPIUM – MAC Installation for iOS

Appium is free to use that is an open source automation testing tool. It is used to test iOS and Android mobile application which could hybrid or native with mobile web applications by uses the website driver protocol as a communication.

For installation on Mac I am using the following:

  • Xcode IDE version 9.3
  • IntelliJ IDEA 2013
  • Standalone- selenium jar file
  • java SDK jar file
  • Appium version 1.7.2
  • MAC OS sierra 10.13.4
  • iOS simulator – iPhone 7

Step 01:
Now click on the link and download Appium as  appium-desktop-1.5.0-mac.zip. After installation, extract the file to drag and drop Appium into the applications.

Step 02: IMPORTANT
After the successful installation now applies these steps carefully.  Go to this link and install XCUITest driver https://github.com/appium/appium-xcuitest-driver. After installation, open terminal and run following commands:

  • brew install libimobiledevice –HEAD
  • brew install ideviceinstaller
  • brew install carthage
  • npm install -g ios-deploy
  • gem install xcpretty

After successful installation, the terminal will print **BUILT SUCCEEDED** on the console so moving on step 03 for web driver protocol configuration

Step 03:
Now open Xcode and open the XCUITest project that you will get from the following folder in your mac
/Users/farihahasan/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
Once, WebDriver.xcodeproj is opened so make sure that WebDriverAgentLib, WebDriverAgentRunner, and IntegrationApp is showing on the file as below screenshot.

Now select IntegrationApp and simulator as iPhone X and run the application. As the application is deployed successfully and launches o the simulator successfully so now you are good to go with Appium.

 

Step 04: Click on Appium application from Launchpad and click on “Start the server v1.7.2″  as the server is started, Click on the “Start Inspector session” to set the required capabilities.

 

After clicking on start inspector the following screen will appear

 

 

 

 

Set the required capabilities as shown in the screenshot and then click on Start Session. As the server started, the iPhone 7 simulator will launch and you could see the web driver application launches successfully.

Step 04:
Now open IntelliJ IDEA and click on ‘New project’. Set java SDK jar file to the library path by clicking on the Project Configuration and now you are good to go with the first test scripts. Under the @Before Test heading, set capabilities as below:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“deviceName”, “iPhone 7”);
capabilities.setCapability(“platformName”, “IOS”);
capabilities.setCapability(“platformVersion”, “9.3”);
capabilities.setCapability(“browserName”, “safari”);
capabilities.setCapability(“automationName”, “XCUITEST”);

After it write down the test script in under @Test heading and close the driver setup under @After Test heading. Now hit on Run button to test the script and see Appium logs for results


Recommended Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us
close slider

Contact Us

You can contact us here