我正在使用 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);
请建议我一些方法来克服这个错误。