Created
February 26, 2015 13:18
-
-
Save toshihirock/df2014e9309f0c3e86bf to your computer and use it in GitHub Desktop.
This file contains hidden or 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" | |
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 |
Author
toshihirock
commented
Feb 26, 2015
- sudo gem install selenium-webdriver
- Selenium-ruby-introduction
- API docs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment