Skip to content

Instantly share code, notes, and snippets.

@mizutaki
Created April 8, 2015 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mizutaki/5ce21f9e6a2af0d164e2 to your computer and use it in GitHub Desktop.
Save mizutaki/5ce21f9e6a2af0d164e2 to your computer and use it in GitHub Desktop.
require 'selenium-webdriver'
driver = Selenium::WebDriver.for :firefox
driver.navigate.to "https://www.google.co.jp/imghp?hl=ja&tab=wi"
element = driver.find_element(:name, 'q')
element.send_keys('ruby')
driver.find_element(:name, 'btnG').click
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment