我是一名使用 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)