对于我的项目,iam运行由测试人员用jenkins编写的硒脚本。我已经下载了适用于Linux的chrome驱动程序,以下是iam遇到的错误
<link rel="dns-prefetch preconnect" href="https://b.tile.openstreetmap.org">
我已按如下所示下载了适用于redhat的chrome
java.lang.IllegalStateException: The driver executable does not exist: /var/lib/jenkins/jobs/Pipeline/workspace/target/test-classes/chromedriver
通过解压缩,我得到了没有扩展名的chromedriver。我在配置文件中给出了chrome驱动程序的路径
cd /var/lib/jenkins/jobs/Pipeline/workspace/target/test-classes
wget -N http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip
unzip /chromedriver_linux64.zip .
有人能告诉我chromedriver安装有问题吗?
下面的Micheal是输出
//Global Path
public String globalPath = System.getProperty("user.dir");
public String chromeDriverPath = globalPath + "//target//test-classes//chromedriver";
irt包含chrome.exe,这是我为Windows环境和chromedriver设计的,我已下载并解压缩为Linux环境。
答案 0 :(得分:0)
此错误消息...
java.lang.IllegalStateException: The driver executable does not exist: /var/lib/jenkins/jobs/Pipeline/workspace/target/test-classes/chromedriver
...表示 WebDriver 可执行文件在预期位置不存在。
您的主要问题是所使用的二进制版本之间的不兼容性:
按行:
wget -N http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip
您正在使用 chromedriver = 2.10
支持 Chrome v33-36
支持支持Chrome v69-71
因此 ChromeDriver v2.10 与 Chrome浏览器v70.0
之间显然存在不匹配@Test
。