Your first test with Appium

With Appium you can run Automated tests against hybrid and native iOS and Android apps.

You do not need to do anything special to your app, just supply an URL to the zipped version of the .app file in the desired capabilities and Appium will extract it and run tests against it.

Since Appium uses the WebDriver protocol, you can use any programming language you want to run tests against it: PHP, Ruby, Java, .NET, NodeJS, Python, ...

Automated Mobile Browser Testing

To run your automated tests on mobile browsers, like Mobile Safari and Android Browser, please see our mobile browser testing examples.

Automated Mobile App Testing

Appium can test your native mobile app on iOS and Android.
TestingBot can run your native app on iOS and Android devices/emulators.

All you need to do is provide a link to the zipped app in the desired capabilities.
Please see the examples below to learn how to do this:

1. Select a Platform
2. Select a Device

#!/usr/bin/env ruby
require 'rubygems'
require 'selenium-webdriver'

caps = {
  :app => "%app%",
  :version => "%version%",
  :platform => "%platform%",
  :deviceName => "%deviceName%",
  :platformName => "%platformName%",
  :name => "My First Mobile Test"

client =
client.timeout = 480

driver = Selenium::WebDriver.for(
  :url => "",
  :http_client => client,
  :desired_capabilities => caps)
# Test Actions Here
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\WebDriverBy;
  $capabilities = array(
      'app' => "%app%",
      'version' => "%version%",
      'platform' => "%platform%",
      'deviceName' => "%deviceName%",
      'platformName' => "%platformName%",
      'name' => "My First Mobile Test"
  $web_driver = RemoteWebDriver::create(
    // Test Actions Here
import org.openqa.selenium.By;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;


public class JavaSample {

  public static final String KEY = "KEY";
  public static final String SECRET = "SECRET";
  public static final String URL = "http://" + KEY + ":" + SECRET + "";

  public static void main(String[] args) throws Exception {

    DesiredCapabilities caps = new DesiredCapabilities();
    caps.setCapability("app", "%app%");
    caps.setCapability("version", "%version%");
    caps.setCapability("platform", "%platform%");
    caps.setCapability("deviceName", "%deviceName%");
    caps.setCapability("platformName", "%platformName%");
    caps.setCapability("name", "My First Mobile Test");

    WebDriver driver = new RemoteWebDriver(new URL(URL), caps);
    // Test Actions Here


import unittest
import sys

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from testingbotclient import TestingBotClient

class TestTestingBotClient(unittest.TestCase):

    def setUp(self):
    desired_cap = {
      'app': '%app%',
      'version': '%version%',
      'platform': '%platform%',
      'deviceName': '%deviceName%',
      'platformName': '%platformName%',
      'name' : 'My First Mobile Test',

    self.driver = webdriver.Remote(

    def test_simple_example(self):
        # Test Actions Here

    def tearDown(self):
    status = sys.exc_info() == (None, None, None)
    tb_client = TestingBotClient('key', 'secret')
    tb_client.tests.update_test(self.driver.session_id, self._testMethodName, status)

if __name__ == '__main__':
var webdriver = require('selenium-webdriver'),
    testingbotKey = "api_key",
    testingbotSecret = "api_secret",
driver = new webdriver.Builder().
    'app': '%app%',
    'version': '%version%',
    'platform': '%platform%',
    'deviceName': '%deviceName%',
    'platformName': '%platformName%',
    'name' : 'My First Mobile Test',
    'client_key': testingbotKey,
    'client_secret': testingbotSecret
  usingServer("http://" + testingbotKey + ":" + testingbotSecret +
// Test Actions Here


It's possible to rotate the device before and during your test. Please see these examples:

Rotate before test:
desired_capabilities = { "orientation" : "LANDSCAPE " } # or PORTRAIT

Rotate during test:
((AppiumDriver) driver).rotate(ScreenOrientation.LANDSCAPE);