我正在使用Winium自动化桌面应用程序。我正在尝试使用脚本启动winium桌面服务器。每当我尝试这样做时,我都会遇到异常 注意:如果我手动启动桌面服务器,不会出现任何错误
exception in thread main java.lang.nosuchmethoderror com.google.common.util.concurrent.SimpleTimeLimiter.create(Ljava/util/concurrent/ExecutorService;)LCom/google/common/util/concurrent/SimpleTimeLimiter;
at org.openqa.Selenium.net.urlchecker.<init>(Urlchecker.java:62)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:187)
at org.openqa.Selenium.remote.service.DriverService.start(DriverService.java:83)
下面我用来启动应用程序的代码
String applicationpath="//my app path";
String winiumDriverPath="//path to my winium driver";
DesktopOptions options = new DesktopOptions();
options.setApplicationPath(//applicationpath);
WiniumDriverService service = new WiniumDriverService.Builder().usingDriverExecutable(new
File(winiumDriverPath)).usingPort(9999).withVerbose(true).withSilent(false).buildDesktopService();
service.start(); // getting error here
driver = new WiniumDriver(service, options);
请给我一些克服此错误的方法。
答案 0 :(得分:0)
实际上这应该是评论,但我没有名声:)
如果依赖项中有多个版本的API,则可能会引起