Mobile testing


Our grid currently supports iPhone iOS 6.1, 7.1, 8.1 and 9.2, Android 4.4 and 5.0 and iPad (iOS 6.1, 7.1, 8.1 and 9.2).

Testing on mobile devices is only available with the Webdriver protocol.



Appium test native and hybrid iOS apps

To run a test in landscape mode, please use the Orientation webdriver command.


Below are some examples on how to test on mobile



iPhone iPad example
Iphone example small
#!/usr/bin/env ruby
require "rubygems"
gem "selenium-client"
gem "selenium-webdriver"
require "selenium-webdriver"
require "selenium/client"


caps = {
  :browserName => "iphone", #or iPad
  :version => "7.1",
  :platform => "MAVERICKS"
}

client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 480

driver = Selenium::WebDriver.for(
  :remote,
  :url => "http://API_KEY:API_SECRET@hub.testingbot.com/wd/hub",
  :http_client => client,
  :desired_capabilities => caps)
driver.navigate.to "http://www.google.com"
element = driver.find_element(:name, 'q')
element.send_keys "Hello WebDriver!"
element.submit
puts driver.title
driver.quit


Android example
Nexus one small
#!/usr/bin/env ruby
require "rubygems"
gem "selenium-client"
gem "selenium-webdriver"
require "selenium-webdriver"
require "selenium/client"


caps = {
	:browserName => "nexus_one", #nexus_one, nexus_s, nexus_four, galaxy_nexus
	:platform => "ANDROID"
}

client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 480

driver = Selenium::WebDriver.for(
  :remote,
  :url => "http://API_KEY:API_SECRET@hub.testingbot.com:4444/wd/hub",
  :http_client => client,
  :desired_capabilities => caps)
driver.navigate.to "http://www.google.com"
element = driver.find_element(:name, 'q')
element.send_keys "Hello WebDriver!"
element.submit
puts driver.title
driver.quit