Created
December 10, 2012 21:23
-
-
Save DanPatey/4253541 to your computer and use it in GitHub Desktop.
List of iPhone and iPad sauce drivers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def local_driver | |
Selenium::WebDriver.for(@browser.to_sym) | |
end | |
def iphone4_driver | |
caps = Selenium::WebDriver::Remote::Capabilities.iphone | |
caps.platform = 'Mac 10.6' | |
caps.version = '4.3' | |
Selenium::WebDriver.for( | |
:remote, | |
:url => 'http://cloudbees_bleacher:[email protected]:80/wd/hub', | |
:desired_capabilities => caps) | |
end | |
def iphone5_driver | |
caps = Selenium::WebDriver::Remote::Capabilities.iphone | |
caps.platform = 'Mac 10.8' | |
caps.version = '5.1' | |
Selenium::WebDriver.for( | |
:remote, | |
:url => 'http://cloudbees_bleacher:[email protected]:80/wd/hub', | |
:desired_capabilities => caps) | |
end | |
def iphone6_driver | |
caps = Selenium::WebDriver::Remote::Capabilities.iphone | |
caps.platform = 'Mac 10.8' | |
caps.version = '6' | |
Selenium::WebDriver.for( | |
:remote, | |
:url => 'http://cloudbees_bleacher:[email protected]:80/wd/hub', | |
:desired_capabilities => caps) | |
end | |
def ipad4_driver | |
caps = Selenium::WebDriver::Remote::Capabilities.ipad | |
caps.platform = 'Mac 10.6' | |
caps.version = '4.3' | |
Selenium::WebDriver.for( | |
:remote, | |
:url => 'http://cloudbees_bleacher:[email protected]:80/wd/hub', | |
:desired_capabilities => caps) | |
end | |
def ipad5_driver | |
caps = Selenium::WebDriver::Remote::Capabilities.ipad | |
caps.platform = 'Mac 10.8' | |
caps.version = '5.1' | |
Selenium::WebDriver.for( | |
:remote, | |
:url => 'http://cloudbees_bleacher:[email protected]:80/wd/hub', | |
:desired_capabilities => caps) | |
end | |
def ipad6_driver | |
caps = Selenium::WebDriver::Remote::Capabilities.ipad | |
caps.platform = 'Mac 10.8' | |
caps.version = '6' | |
Selenium::WebDriver.for( | |
:remote, | |
:url => 'http://cloudbees_bleacher:[email protected]:80/wd/hub', | |
:desired_capabilities => caps) | |
end | |
def android_driver | |
caps = Selenium::WebDriver::Remote::Capabilities.android | |
caps.platform = 'Linux' | |
caps.version = '4' | |
Selenium::WebDriver.for( | |
:remote, | |
:url => 'http://cloudbees_bleacher:[email protected]:80/wd/hub', | |
:desired_capabilities => caps) | |
end | |
def saucelabs_driver | |
caps = Selenium::WebDriver::Remote::Capabilities.send(@browser.to_sym) | |
caps.version = @version unless @browser.to_s == 'chrome' | |
caps.platform = @os | |
caps[:name] = @title || 'BR Selenium Ruby and Sauce Test' | |
Selenium::WebDriver.for( | |
:remote, | |
:url => 'http://cloudbees_bleacher:[email protected]:80/wd/hub', | |
:desired_capabilities => caps) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment