有谁知道为什么Minium(Selenium Webdriver Java Cucumber)抛出这个错误的痕迹?
我一直在寻找几个小时,似乎没有什么能解决这个错误 .
Proyect structure
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:无法加载胶水src / test / resources / steps org.mozilla.javascript.WrappedException: Wrapped org.springframework.beans.factory.UnsatisfiedDependencyException:在minium.web.config.WebElementsConfiguration中定义名称为'browser'的bean创建错误:通过方法'browser'参数0表示不满意的依赖关系;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名为'wd'的bean在minium.web.config.WebElementsConfiguration中定义错误:通过工厂方法进行Bean实例化失败;嵌套异常是org.springframework.beans.BeanInstantiationException:无法实例化[org.openqa.selenium.WebDriver]:工厂方法'wd'抛出异常;嵌套异常是java.lang.IllegalStateException:驱动程序可执行文件的路径必须由webdriver.chrome.driver系统属性设置;有关更多信息,请参阅https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver . 最新版本可以从orch.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1893)的orch.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1893)的http://chromedriver.storage.googleapis.com/index.html(minium/minium.js#23)下载.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
1 回答
您需要检查自己的Google Chrome浏览器版本,以下载与浏览器版本匹配的chromedriver . 如果您没有使用最新版本,请下载与您的浏览器版本匹配的chromedriver,并将".exe"文件复制到Minium Developer的 drivers 文件夹中 .
如果您拥有最新的Google Chrome浏览器版本,Minium Developer可以为您下载最新的网络驱动程序:https://minium.vilt.io/docs/developer/minium-developer/#update-webdrivers