Created
November 5, 2011 05:30
-
-
Save nobusue/1341148 to your computer and use it in GitHub Desktop.
コードで自己紹介 @jggug Camp 2011
This file contains 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
@Grapes([ | |
@Grab("org.codehaus.geb:geb-core:latest.release"), | |
@Grab("org.seleniumhq.selenium:selenium-firefox-driver:latest.release") | |
]) | |
import geb.Browser | |
Browser.drive { | |
go "http://www.facebook.com/profile.php?id=732337788" | |
go "http://d.hatena.ne.jp/keyword/" | |
assert title == "はてなキーワード - 話題の言葉がわかる、みんなで編集するキーワード" | |
$("form.header-search").word = "nobusue" | |
$("form.header-search").find("input", name:"submit").click() | |
assert title == "はてな検索: nobusue" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment