【问题标题】:Minium is throwing error with glue and browserMinium 使用胶水和浏览器抛出错误
【发布时间】:2018-07-10 10:45:49
【问题描述】:

有人知道为什么 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:无法加载胶水 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:创建在 minium.web.config.WebElementsConfiguration 中定义的名称为“wd”的 bean 时出错:通过工厂方法进行 Bean 实例化失败;嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 [org.openqa.selenium.WebDriver]:工厂方法 'wd' 抛出异常;嵌套异常为 java.lang.IllegalStateException:驱动程序可执行文件的路径必须由 webdriver.chrome.driver 系统属性设置;有关详细信息,请参阅https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver。最新版本可以从http://chromedriver.storage.googleapis.com/index.html(minium/minium.js#23)下载 在 org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1893) 在 org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)

【问题讨论】:

  • 在不知道您的代码的情况下,我猜它与消息The path to the driver executable must be set by the webdriver.chrome.driver system property 的这一部分有关。
  • 我添加了代码
  • 您与引用的错误消息和堆栈跟踪中提供的链接有什么关系?

标签: java spring selenium-webdriver cucumber


【解决方案1】:

您需要检查您的 Google Chrome 浏览器版本以下载与浏览器版本匹配的chromedriver。如果您使用的不是最新版本,请下载与您的浏览器版本匹配的chromedriver,并将“.exe”文件复制到Minium Developer的drivers文件夹中。

如果您有最新的 Google Chrome 浏览器版本,Minium Developer 可以为您下载最新的网络驱动程序:https://minium.vilt.io/docs/developer/minium-developer/#update-webdrivers

【讨论】:

  • 最好使用 Minium IDE 而不是 Spring 框架,谢谢
猜你喜欢
  • 2013-07-16
  • 1970-01-01
  • 1970-01-01
  • 2014-09-14
  • 2021-05-02
  • 2023-04-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多