如何使用所有依赖项为新 chromedriver/selenium 更新 Maven 项目
How to update maven project for new chromedriver/selenium with all dependencies
使用新版本的 Chromedriver (76) 我无法使用 class Actions
和 moveToElement
方法。
据我所知,我还必须更新 selenium。但是当我更新 selenium 时,我得到了错误:
cucumber.runtime.CucumberException:
class steps.MainHooks doesn't have an empty constructor. If you need
DI, put cucumber-picocontainer on the classpath
然后我更新了appium,fluentlenium等等..
所以我的问题是,最新 selenium 的依赖项的正确版本是什么?我正在使用 Fluentlenium、Cucumber、Junit。
selenium 最新版本可以使用 3.1XX.X
使更新版本需要依赖项。这可以在 Compile Dependencies 部分或 IDE 中看到,您可以转到 selenium 的 pom,在那里您可以看到它们所需的依赖关系。
你可以在下面看到版本URL https://mvnrepository.com/artifact/org.seleniumhq.selenium
您需要为 cucumber-picocontainer 安装相同版本的 cucumber。然后,您必须在 Windows 的 EnviromentsSetting 中的 CLASSPATH 添加到位于您的 .m2 存储库中的 cucumber-picocontainer-version.jar 的路径,例如 "C:\Users\Usuario.m2\repository\io\cucumber\cucumber-picocontainer.7.0*"。最后,重新启动 IDE 以进行更改。您可以使用以下命令检查 IDE 控制台中的 CLASSPATH 是否可用:set CLASSPATH.
使用新版本的 Chromedriver (76) 我无法使用 class Actions
和 moveToElement
方法。
据我所知,我还必须更新 selenium。但是当我更新 selenium 时,我得到了错误:
cucumber.runtime.CucumberException: class steps.MainHooks doesn't have an empty constructor. If you need DI, put cucumber-picocontainer on the classpath
然后我更新了appium,fluentlenium等等..
所以我的问题是,最新 selenium 的依赖项的正确版本是什么?我正在使用 Fluentlenium、Cucumber、Junit。
selenium 最新版本可以使用 3.1XX.X
使更新版本需要依赖项。这可以在 Compile Dependencies 部分或 IDE 中看到,您可以转到 selenium 的 pom,在那里您可以看到它们所需的依赖关系。
你可以在下面看到版本URL https://mvnrepository.com/artifact/org.seleniumhq.selenium
您需要为 cucumber-picocontainer 安装相同版本的 cucumber。然后,您必须在 Windows 的 EnviromentsSetting 中的 CLASSPATH 添加到位于您的 .m2 存储库中的 cucumber-picocontainer-version.jar 的路径,例如 "C:\Users\Usuario.m2\repository\io\cucumber\cucumber-picocontainer.7.0*"。最后,重新启动 IDE 以进行更改。您可以使用以下命令检查 IDE 控制台中的 CLASSPATH 是否可用:set CLASSPATH.