Created
June 9, 2012 08:35
-
-
Save rohinomiya/2900141 to your computer and use it in GitHub Desktop.
Watir でIEやGoogle Chromeを自動操縦する ref: http://qiita.com/items/389d75daa97e9d2275cc
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
gem update --system | |
gem install watir | |
gem install watir-webdriver |
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
<div class="goog-inline-block goog-toolbar-button" id=":f" roll="button"> |
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
browser.div(:class,"goog-inline-block goog-toolbar-button").click | |
browser.div(:id => ":f").click |
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 "watir" # for IE | |
require "watir-webdriver" # for Firefox/Chrome | |
#browser = Watir::IE.new | |
browser = Watir::Browser.new :chrome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment