The use of the following test frameworks and test tools has been evaluated and tested. Other common frameworks and test tools are under evaluation. If you have any questions about using your preferred test tools, please feel free to
With Appium, you can create automated tests for your Android, iOS and web applications without having to make any changes to the applications.
All Selenium API-compatible programming languages are available for developing your tests.
The Appium driver provides you with the familiar Selenium environment on our mobile devices.
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.IOSElement;
import io.appium.java_client.remote.IOSMobileCapabilityType;
import io.appium.java_client.remote.MobileCapabilityType;
import org.junit.*;
import org.openqa.selenium.By;
import org.openqa.selenium.ScreenOrientation;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.net.MalformedURLException;
import java.net.URL;
public class LocaliOSTest {
private String accessKey = "<ACCESS_KEY>";
protected IOSDriver<IOSElement> driver = null;
DesiredCapabilities dc = new DesiredCapabilities();
@Before
public void setUp() throws MalformedURLException {
dc.setCapability("testName", "Quick Start iOS Native Demo");
dc.setCapability("accessKey", accessKey);
dc.setCapability("deviceQuery", "@os='ios' and @category='PHONE'");
dc.setCapability(MobileCapabilityType.APP, "cloud:com.experitest.ExperiBank");
dc.setCapability(IOSMobileCapabilityType.BUNDLE_ID, "com.experitest.ExperiBank");
driver = new IOSDriver<>(new URL("https://mobiledevicecloud-test.t-systems-mms.eu/wd/hub"), dc);
}
@Test
public void quickStartiOSNativeDemo() {
driver.rotate(ScreenOrientation.PORTRAIT);
driver.findElement(By.xpath("//*[@id='usernameTextField']")).sendKeys("company");
driver.hideKeyboard();
driver.findElement(By.xpath("//*[@id='passwordTextField']")).sendKeys("company");
driver.findElement(By.xpath("//*[@id='loginButton']")).click();
driver.findElement(By.xpath("//*[@id='makePaymentButton']")).click();
driver.findElement(By.xpath("//*[@id='phoneTextField']")).sendKeys("0541234567");
driver.findElement(By.xpath("//*[@id='nameTextField']")).sendKeys("Jon Snow");
driver.findElement(By.xpath("//*[@id='amountTextField']")).sendKeys("50");
driver.findElement(By.xpath("//*[@id='countryButton']")).click();
driver.findElement(By.xpath("//*[@id='Switzerland']")).click();
driver.findElement(By.xpath("//*[@id='sendPaymentButton']")).click();
driver.findElement(By.xpath("//*[@id='Yes']")).click();
}
@After
public void tearDown() {
System.out.println("Report URL: "+ driver.getCapabilities().getCapability("reportUrl"));
driver.quit();
}
}
1.
2.
3.
4.
Search in the
Follow the instructions of the repository to include the client.
Before your tests, initialise an Appium driver that you can use later to control and automate elements of your app.
The driver needs two pieces of information:
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability("accessKey", "<ACCESS_KEY>");
IOSDriver<IOSElement> driver = new IOSDriver<>(new URL("https://mobiledevicecloud.t-systems-mms.eu/wd/hub"), dc);
It is best to build the driver in the setup() method of your tests and to close it in the teardown() method.
Use the example above as a guide.
Upload your app to the Mobile Device Cloud and give the Appium driver the bundle ID of your app to launch it automatically.
dc.setCapability(MobileCapabilityType.APP, "cloud:<BUNDLE_ID>");
Use the Appium driver methods to automate your app:
findElement(...)
sendKeys(...)
hideKeyboard()
rotate(...)
...