Skip to content

Instantly share code, notes, and snippets.

@toshihirock
Created February 26, 2015 13:18
Show Gist options
  • Save toshihirock/df2014e9309f0c3e86bf to your computer and use it in GitHub Desktop.
Save toshihirock/df2014e9309f0c3e86bf to your computer and use it in GitHub Desktop.
require "selenium-webdriver"
driver = Selenium::WebDriver.for :firefox
driver.navigate.to "http://www.google.co.jp"
element = driver.find_element(:name, 'q')
element.send_keys "selenium"
element.submit
puts driver.title
driver.save_screenshot('/Users/toshihirock/ruby/test.png')
driver.quit
@toshihirock
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment