有谁知道为什么 Minium(Selenium Webdriver Java + Cucumber)抛出这个错误跟踪?
我已经找了几个小时了,但似乎没有什么可以解决这个错误。
项目结构
Java:
import minium.cucumber.MiniumCucumber;
import java.io.IOException;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.cli.Main;
import ModulosComunesWeb.*;
@RunWith(MiniumCucumber.class)
/*@CucumberOptions(
features = "LO-PPE-WEB-AltaFavoritos.feature"
// ,glue={"stepDefinition"}
)
@CucumberOptions(
features= "LO-PPE-WEB-AltaFavoritos.feature"
)*/
public class LOFavoritasIT {
}
2018-07-10 12:35:08.977 WARN 17180 --- [engine-thread-0] minium.cucumber.internal.MiniumBackend : Could not load glue src/test/resources/steps
org.mozilla.javascript.WrappedException: Wrapped org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'browser' defined in minium.web.config.WebElementsConfiguration: Unsatisfied dependency expressed through method 'browser' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wd' defined in minium.web.config.WebElementsConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.openqa.selenium.WebDriver]: Factory method 'wd' threw exception; nested exception is java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html (minium/minium.js#23) at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1893) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
最佳答案
您需要检查您的 Google Chrome 浏览器版本才能下载 chromedriver匹配浏览器版本。如果您使用的不是最新版本,请下载与您的浏览器版本匹配的 chromedriver 并将“.exe”文件复制到 Minium Developer 的 drivers 文件夹中。
如果你有最新的谷歌Chrome浏览器版本,Minium Developer可以为你下载最新的webdrivers:https://minium.vilt.io/docs/developer/minium-developer/#update-webdrivers
关于java - Minium 使用胶水和浏览器抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51263236/