Skip to content

Instantly share code, notes, and snippets.

@prashanth-sams
Last active August 29, 2015 14:01
Show Gist options
  • Save prashanth-sams/6c536f6eda049abac047 to your computer and use it in GitHub Desktop.
Save prashanth-sams/6c536f6eda049abac047 to your computer and use it in GitHub Desktop.
Sample Selenium Test using Ruby Bindings
#!/usr/local/bin/ruby
require 'rubygems'
require "selenium-webdriver"
driver = Selenium::WebDriver.for :firefox
driver.navigate.to "http://google.com"
element = driver.find_element(:name, 'q')
element.send_keys "Prashanth Sams"
element.submit
driver.quit
__________________________________________________
To Run Test
chmod +x filename.rb
./filename.rb
__________________________________________________
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment