【问题标题】:Azure devops error Starting ChromeDriver 2.36.540470 on port. Only local connections are allowedAzure devops 错误在端口上启动 ChromeDriver 2.36.540470。只允许本地连接
【发布时间】:2019-01-22 13:51:22
【问题描述】:

Azure devops 错误在端口上启动 ChromeDriver 2.36.540470。只允许本地连接。 无法在 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;

【问题讨论】:

    标签: c# selenium selenium-webdriver continuous-integration azure-devops


    【解决方案1】:

    您的主要问题是您使用的二进制文件之间的版本兼容性,如下所示:

    • 您正在使用 chromedriver=2.36
    • chromedriver=2.36 的发行说明明确提及以下内容:

    支持 Chrome v63-65

    • 假设您使用的是当前的 chrome=71.0
    • ChromeDriver v2.45 的发行说明明确提及以下内容:

    支持 Chrome v70-72

    所以 ChromeDriver v2.36Chrome 浏览器 v71.0

    之间存在明显的不匹配

    解决方案

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-13
      • 2019-07-22
      • 1970-01-01
      • 2019-11-03
      • 2019-01-03
      • 1970-01-01
      • 2013-02-25
      相关资源
      最近更新 更多