Appium | Automate iOS Application Using Testmate

Testmate allows you to automate iOS applications using Appium engine. To automate iOS, you have to use selenium grid functionality as you can not install Testmate on the Mac machine.

Setup

  1. Start a Hub on your  Windows machine (where Testmate resides)
  2. Register a Mac machine as a node (from Mac machine)
  3. Start Appium server on Mac machine
  4. Run the below code in Testmate on Windows machine (registered as a hub)

Read more about the selenium grid here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
'Reset the capabilities
app.InitializeOptions()
 
'Set the platform name 
app.SetCapability "platformName", "iOS"
 
'set Device name
app.SetCapability "deviceName", "iPhone 7"
 
'Set Platform version
app.SetCapability "platformVersion", "11.2"
 
'set browser name
app.SetCapability "browserName", "Safari"
 
'Get IoS with Timeout Set as 300 seconds
Call app.GetIOSDriver("http://192.168.50.128:4723/wd/hub",300)
 
'Navigate to the URL
Call app.NavigateToUrl("http://www.google.com")
 
'Search the keyword
app.SendKeys "name::q", "Testmate Appium"
 
'Goto Teaser for Testmate
Call app.NavigateToUrl("https://www.youtube.com/watch?v=kijKozek5zs")

Add a Comment

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