0

我是一名使用 Cucumber、Serenity 和 Gradle 的自动化测试人员。我刚刚更新了我的build.gradle属性文件以使用[Selenium Chrome Driver » 3.2.0]并运行了我的登录测试,发现[Selenium Chrome Driver » 3.0.1]中没有发生错误。

使用 3.1.0 编译组时我也遇到同样的错误:'org.seleniumhq.selenium', name: 'selenium-chrome-driver', version: '3.1.0'.

我移回了 3.0.1 版本,该版本没有任何问题。这是我收到的错误消息:

net.serenitybdd.core.exceptions.SerenityManagedException: org.openqa.selenium.os.CommandLine.find(Ljava/lang/String;)Ljava/lang/String;
    at net.serenitybdd.core.webdriver.servicepools.DriverServiceExecutable.asAFile(DriverServiceExecutable.java:90)
    at net.serenitybdd.core.webdriver.servicepools.GeckoDriverServiceExecutable.geckoBinaryCalled(GeckoDriverServiceExecutable.java:38)
    at net.serenitybdd.core.webdriver.servicepools.GeckoDriverServiceExecutable.executablePath(GeckoDriverServiceExecutable.java:24)
    at net.serenitybdd.core.webdriver.servicepools.GeckoDriverServiceExecutable.inEnvironment(GeckoDriverServiceExecutable.java:20)
    at net.serenitybdd.core.webdriver.servicepools.GeckoServicePool.configureGeckoDriverBinaries(GeckoServicePool.java:38)
    at net.serenitybdd.core.webdriver.servicepools.GeckoServicePool.<init>(GeckoServicePool.java:29)
    at net.serenitybdd.core.webdriver.driverproviders.FirefoxDriverProvider.<init>(FirefoxDriverProvider.java:29)
    at net.thucydides.core.webdriver.WebDriverFactory.driverProviders(WebDriverFactory.java:102)
    at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:126)
    at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:144)
    at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:135)
    at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:105)
    at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:180)
    at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:175)
    at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:829)
    at net.serenitybdd.core.pages.PageObject.openAt(PageObject.java:782)
    at faa.cucumber.stepLibraries.BaseUserSteps.navigateToTheFaaHomePage(BaseUserSteps.java:60)
    at faa.cucumber.stepLibraries.BaseUserSteps$$EnhancerByCGLIB$$9ba37e92.CGLIB$navigateToTheFaaHomePage$26(<generated>)
    at faa.cucumber.stepLibraries.BaseUserSteps$$EnhancerByCGLIB$$9ba37e92$$FastClassByCGLIB$$7f7ccb1e.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:372)
    at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:357)
    at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:332)
    at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:134)
    at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:61)
    at faa.cucumber.stepLibraries.BaseUserSteps$$EnhancerByCGLIB$$9ba37e92.navigateToTheFaaHomePage(<generated>)
    at faa.cucumber.maps.NavigationMap.given_welcome(NavigationMap.java:197)
    at ✽.Given i have accessed the welcome page(login.feature:11)
4

2 回答 2

0

编译组:'org.seleniumhq.selenium',名称:'selenium-chrome-driver',版本:'3.0.1'

我没有使用硒。我正在使用 Gradle、Cucumber、Serenity。

于 2017-03-14T17:53:26.723 回答
0

我没有使用maven。我正在使用创建了一个gradle项目,编写了黄瓜功能文件,然后编写了java map、steps和page classes。然后我在命令行使用 git-bash 运行我的测试。我的测试运行并创建了一份宁静报告。3年来一直这样做。

这是我的 build.gradle 文件的一部分,用于显示我当前的 chrome 驱动程序。当我将驱动程序更新到 3.2.0 时,我收到了之前发布的错误消息。

编译组:'org.seleniumhq.selenium',名称:'selenium-chrome-driver',版本:'3.0.1'

于 2017-03-29T11:19:37.913 回答