Appium: iOS automation testing for Demo

Note: For Xcode 8 or above, UIAutomation will not work anymore.

First of all, all the environment settings should be done.

Then, download the demo app (TestApp.app) from github: https://github.com/appium/ios-test-app, and build it into your simulator using Xcode. Find the TestApp.app file in the folder (the path will be used as the capability “app” for iOS).

Snip20170704_3.png

Next, enter the capabilities into Appium and start the session.

Snip20170704_1.png

For the elements that have same locator values, e.g. accessibility id, we can create a list and then locate to a particular element. Note that the elements of the list starts from 0: the first element is the 0th one, then the second element is the 1st one, the third is the 2nd one:

 IList <AppiumWebElement> AppElemList = driver.FindElementsById(AppElem);

//Then I want to select the second element of this ID:

AppElemList[1].SendKeys(0.8);

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