Created
June 6, 2016 23:09
-
-
Save izaac/6bcf88619c91b24fcd31b0c2e052aabf to your computer and use it in GitHub Desktop.
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
require "selenium-webdriver" | |
saucelabs_username = "zfilipin" | |
saucelabs_key = "" # secret | |
name = "firefox" | |
version = "36.0" | |
platform = "Linux" | |
caps = Selenium::WebDriver::Remote::Capabilities.send(name) | |
caps.version = version | |
caps.platform = platform | |
caps[:name] = "#{name} #{version} #{platform}" | |
driver = Selenium::WebDriver.for( | |
:remote, | |
url: "http://#{saucelabs_username}:#{saucelabs_key}@ondemand.saucelabs.com:80/wd/hub", | |
desired_capabilities: caps) | |
driver.get "http://en.wikipedia.beta.wmflabs.org/wiki/Main_Page" | |
p driver.find_element(css: "a[href='/w/index.php?title=Main_Page&action=history']").displayed? | |
#p driver.find_element(css: "a[href*='action=history']").displayed? | |
driver.quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment