0
import geb.Browser
import org.openqa.selenium.firefox.FirefoxDriver

Browser.drive {
    go "google.com"
}

上記のスクリプトを実行すると、次のエラーが発生します。java.lang.NoClassDefFoundError: org/openqa/selenium/TakesScreenshot

4

1 に答える 1

1

ドキュメントページ(およびMaven情報)に記載されているように、次のものが必要です。

org.codehaus.geb:geb-implicit-assertions:0.7.2
org.seleniumhq.selenium:selenium-api:2.15.0
org.seleniumhq.selenium:selenium-support:2.15.0

selenium-apiはgoogleguavaに依存します

とセレンのサポートはに依存し junithamcrest

また、gebがカバーの下で使用するため、クラスパスにgroovyを追加する必要があります。

于 2012-10-19T11:14:54.713 に答える