Appium : Step by step Native IOS App Automation - Part 3(iOS Simulator)

In this Part 3 , we are talking about iOS Simulator command line commands.

How this will be helpful in automation:
This will helpful in checking/verifying your iOS app whether it’s working fine without Appium or any other automation tool in picture. Once you find your app works well then you can go for automation with Appium, this is just to save your time from unnecessary troubleshooting.

Here we start with some useful and important commands

1. To get the list of Simulators available in your system , you can type below command
-> Open Terminal and type below command
                        xcrun instruments -s

2. To launch Simulator using command line , you can type below command and provide same of simulator as you got from step 1 above
-> Open Terminal and type below command
$ xcrun instruments -w "iPhone 6 (9.2)”   // replace with your Simulator name

3. To install app on Simulator using command line once Simulator is up and running, you can type below command
-> Open Terminal and type below command
                        xcrun simctl install booted <app path>
                  e.g xcrun simctl install booted /Users/macuser/Desktop/UIKitCatalog.app

4. To launch an installed app on your simulator , type below command(you can also click/tap the app and launch in simulator using mouse )
-> Open Terminal and type below command
                        xcrun simctl launch booted <app identifier>  

// To get an app identifier or Bundle Identifier you can get it from info.plist file
     e.g xcrun simctl launch booted com.example.apple-samplecode.UIKitCatalog


if you are interested to learn more about all available subcommands you can get by running
          $ xcrun simctl

Hope this helps to get acquainted yourself with basic as well as important iOS simulator commands.click here for Part 2

In Part 4 , we will see the sample demo program of iOS Native App automation using Appium. Stay tuned.


No comments:

Post a Comment

Android : How to connect your Android device over Wifi using ADB command for App debugging

How to connect your Android device over Wi-Fi using ADB command Sometimes it requires to connect your Android dev...