Created
June 25, 2014 16:31
-
-
Save akshay-bhardwaj/6626b12b43653fd77261 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 'rubygems' | |
require 'selenium-webdriver' | |
# Input capabilities | |
caps = Selenium::WebDriver::Remote::Capabilities.new | |
caps["browser"] = "chrome" | |
caps["browser_version"] = "33.0" | |
caps["os"] = "Windows" | |
caps["os_version"] = "8.1" | |
caps["browserstack.debug"] = "true" | |
caps["name"] = "Testing Selenium 2 with Ruby on BrowserStack" | |
driver = Selenium::WebDriver.for(:remote, | |
:url => "http://akshaybhardwaj1:XQWDewaJsUzqYJRv8zhr@hub.browserstack.com/wd/hub", | |
:desired_capabilities => caps) | |
driver.navigate.to "http://panel-guitest-grunt.s3-website-us-east-1.amazonaws.com/login/" | |
element = driver.find_element(:xpath, "//body//form//div[@class='login-form-content']//div[@class='basic-form smaller-font']//div[@class='row fld-username']//span[@class='inputs']//input") | |
puts driver.title | |
driver.quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment