package com.testdroid.appium.ios.sample;

import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import com.testdroid.appium.BaseIOSTest;

import java.util.concurrent.TimeUnit;

public class IosAppiumExampleTest extends BaseIOSTest {
    
    @BeforeClass
    public void setUp() throws Exception {
        setUpTest();
    }
    @AfterClass
    public void tearDown()
    {
        quitAppiumSession();
    }

    @Test
    public void mainPageTest() throws Exception {
        wd.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
        wd.findElement(By.name("answer1")).click();
        WebElement element = wd.findElement(By.name("userName"));
        takeScreenshot("example_screenshot");
        element.click();
        element.sendKeys("Testdroid");
        wd.findElement(By.name("Return")).click();
        wd.findElement(By.name("sendAnswer")).click();
    }


}

@@ -363,20 +363,16 @@
 STest %7B%0A
-    
 %0A    @Be
@@ -695,21 +695,46 @@
 (By.
+xpath(%22//*%5Bcontains(@
 name
-(%22
+, '
 answer1
+')%5D
 %22)).
@@ -793,22 +793,44 @@
 (By.
+xpath(%22//*%5Bcontains(@
 name
-(%22
+, '
 userName
 %22));
@@ -825,16 +825,19 @@
 userName
+')%5D
 %22));%0A   
@@ -973,20 +973,45 @@
 (By.
+xpath(%22//*%5Bcontains(@
 name
-(%22
+, '
 Return
+')%5D
 %22)).
@@ -1049,14 +1049,36 @@
 (By.
+xpath(%22//*%5Bcontains(@
 name
-(%22
+, '
 send
@@ -1083,16 +1083,19 @@
 ndAnswer
+')%5D
 %22)).clic

Replace deprecated By.name locators with By.xpath