Appium | Automate IOS Application Using Testmate

Testmate allows you to automate IOS applications using appium engine. To automate IOS we have to use selenium grid functionality as we can not install testmate on 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 hub)

Read more about 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
27
28
29
30
31
32
'Reset the capabilities
app.ReInitializeCapability()
 
'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"
 
'Click on Search button
app.Click "xpath::/html/body/div[3]/div[2]/div[2]/div[1]/form/div[2]/div[1]/div[1]/button"
 
'Wait for 5 Seconds
util.Wait(5)
 
'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 *