在端口上启动ChromeDriver 2.36.540470时发生Azure devops错误。仅允许本地连接。无法在azure devops上执行构建。但是,在本地系统上,我们可以执行exe。
我使用下面的函数返回azure devops上的路径
代码试验:
string path = System.Reflection.Assembly.GetCallingAssembly().CodeBase;
// System.IO.Path.GetDirectoryName ( System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
string actualPath = path.Substring(0, path.LastIndexOf("bin") );
string driverPath = new Uri(actualPath).LocalPath;
driverPath = driverPath + "Driver"; return driverPath;发布于 2019-01-22 21:58:16
您的主要问题是您正在使用的二进制文件之间的版本兼容性,如下所示:
支持Chrome v63-65
假设您正在使用的当前chrome=71.0
支持Chrome v70-72
因此,ChromeDriver v2.36和Chrome浏览器v71.0之间存在明显的不匹配
解决方案
@Test.(为您的系统创建系统)
https://stackoverflow.com/questions/54309790
复制相似问题