如果我在使用以下命令启动appium服务器时使用特定的chrome驱动程序,我就能够在Android上启动chrome:
appium --chromedriver-executable path/to/chromedriver但是,当我尝试使用chromedriverExecutableDir功能启动chrome时,如下所示:
File classpath = new File(System.getProperty("user.dir"));
File app = new File(classpath, "/chromedriver");
cap.setCapability("chromedriverExecutableDir", app.getAbsolutePath());它抛出一个错误,上面说:
在path/to/色度驱动程序中找不到色度驱动程序
我也尝试过使用chromedriverExecutable功能
发布于 2019-11-18 16:38:50
也许,我最好的猜测是,您使用的是与色度驱动器的相对路径,这就是为什么appium报告没有找到色度驱动器的原因。
当通过CLI/终端使用带有appium命令的参数时,请使用绝对(完整路径)。
Windows:
appium --chromedriver-executable C:\webdrivers\chromedriver.exeLinux/Mac
appium --chromedriver-executable /Users/<username>/Documents/webdrivers/chromedriverhttps://stackoverflow.com/questions/58883859
复制相似问题