私は次の設定をしています:
- インストールされたJDK & JRE 6u29
- インストールされたセレンスタンドアロン2.8
- グルービー 1.8.3
- ゲブ 0.6.1
GroovyConsole だけを使用して、Geb マニュアルに記載されている最初の例を実行しようとしました。
import geb.Browser
Browser.drive {
go "http://google.com/ncr"
// make sure we actually got to the page
assert title == "Google"
// enter wikipedia into the search field
$("input", name: "q").value("wikipedia")
// wait for the change to results page to happen
// (google updates the page dynamically without a new request)
waitFor { title.endsWith("Google Search") }
// is the first link to wikipedia?
def firstLink = $("li.g", 0).find("a.l")
assert firstLink.text() == "Wikipedia"
// click the link
firstLink.click()
// wait for Google's javascript to redirect to Wikipedia
waitFor { title == "Wikipedia" }
}
しかし、次のエラーが発生しています:
警告: スタックトレースのサニタイズ:
geb.waiting.WaitTimeoutException: 条件が 5.0 秒以内に渡されませんでした
例に何か問題がありますか?私は何か間違ったことをしていますか?非常に最初の例が実行されないことを考えると、これは非常に苛立たしいことです!