【发布时间】: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