【发布时间】:2014-03-16 08:55:04
【问题描述】:
我是 Geb 的新手,而且很时髦,我开始阅读“Geb 之书”(http://www.gebish.org/manual/current/index.html) 我正在尝试在 IntelliJ 中配置和运行简单的脚本
我手动下载 jar 文件:
geb-core-0.9.2.jar、selenium-firefox-driver-2.26.0.jar、selenium-support-2.26.0.jar我打开 IntelliJ 并创建新的 Groovy 项目“MyTest”
在 IntelliJ 中:文件 ->“项目设置”并将我下载的 3 个 jar 文件添加到库中
Jar 文件已添加到我的外部库中
在 MyTest 项目/Src 下,我创建了一个 Groovy 类“MyClass”
-
我添加一个简单的代码:
import geb.Browser import org.openqa.selenium.firefox.FirefoxDriver class MyClass { def browser = new Browser(driver: new FirefoxDriver()) } 编译并得到错误 Groovyc:无法解析类 org.openqa.selenium.firefox.FirefoxDriver
我以几种形式读到这是关于依赖的,但我不明白如何解决这个问题。
【问题讨论】:
标签: groovy intellij-idea selenium-webdriver geb