1

我正在尝试将 Serenity 与 Cucumber 和 Spring 一起使用,但由于此异常,我无法启动应用程序:

org.openqa.selenium.interactions.internal.Locatable

这是我的build.gradle样子:

buildscript {
    ext {
        springBootVersion = '1.5.8.RELEASE'
    }
    repositories {
        // Nexus Repository
    }
    dependencies {
        ...
        classpath("net.serenity-bdd:serenity-gradle-plugin:1.8.21")
    }
}

...
apply plugin: 'org.springframework.boot'
apply plugin: 'net.serenity-bdd.aggregator'

sourceCompatibility = 1.8

repositories {
    // Nexus Repository
}

dependencies {
    ...
    testCompile group: 'net.serenity-bdd', name: 'serenity-spring', version: '1.8.21'
    testCompile group: 'net.serenity-bdd', name: 'serenity-cucumber', version: '1.6.10'

    testCompile group: 'junit', name: 'junit', version: '4.12'
    testCompile('org.springframework.boot:spring-boot-starter-test')

}

gradle.startParameter.continueOnFailure = true

我只能访问私有 Nexus 存储库以获取依赖项,以及serenity-springis1.8.21和 for serenity-cucumberis的最新版本1.6.10

下面是 Runner 类的样子:

@RunWith(CucumberWithSerenity.class)
@CucumberOptions(
        features = "src/test/resources/features",
        format = {"pretty","html:report"},
        glue = "<ommited>"
)
public class CucumberTestRunner {
}

我只能找到似乎过时的文档:http: //thucydides.info/docs/serenity-staging/#_building_serenity_projects_in_gradle

4

1 回答 1

0

这看起来像是与 Selenium 的版本不兼容。但使用 serenity-cucumber 1.6.10 也会更明智。

于 2018-01-17T07:56:05.433 回答