Я пытаюсь запустить свой тест (cucumber, java, intelliJ), но я получаю поток исключений:
java.lang.IllegalStateException: The path to the driver executable must be
set by the webdriver.gecko.driver system property; for more information, see
https://github.com/mozilla/geckodriver. The latest version can be downloaded
from https://github.com/mozilla/geckodriver/releases
Я использую Selenium 3.141.5 и Mozilla 63.0.1.
Я стараюсь учиться с книгой: "Книга Огурец на Яве"
Некоторые объяснения не о текущих версиях, поэтому я получаю некоторые проблемы ...
Но я надеюсь, что вы можете помочь мне
Вот мой build.gradle:
plugins {
id 'java'
}
group 'cucumber_cash_withdrawal'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile 'io.cucumber:cucumber-java:2.4.0'
testCompile 'io.cucumber:cucumber-junit:2.4.0'
testCompile group: 'info.cukes', name: 'cucumber-picocontainer', version: '1.2.5'
implementation group: 'org.eclipse.jetty', name: 'jetty-webapp', version: '9.4.12.v20180830'
implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '3.141.5'
}
configurations {
cucumberRuntime {
extendsFrom testRuntime
}
}
task cucumber() {
dependsOn assemble, compileTestJava
doLast {
javaexec {
main = "cucumber.api.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty', '--glue', 'gradle.cucumber', 'src/test/resources']
}
}
}
apply plugin: 'java'
task runApp(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'cash_withdrawal.AtmServer'
}