gpt4 book ai didi

azure - Azure DevOps 中的错误日志中出现错误

转载 作者:行者123 更新时间:2023-12-03 05:35:34 24 4
gpt4 key购买 nike

美好的一天,我在 Azure Devops 中运行测试自动化脚本(Visual Studio、Selenium、C#)时收到此错误日志。它在本地运行良好。这是我在 Azure Devops 中收到的错误日志。

[07/16/2020 14:12:59 > b1b2b5: SYS INFO] Status changed to Initializing
[07/16/2020 14:12:59 > b1b2b5: SYS INFO] Run script 'run.cmd' with script host - 'WindowsScriptHost'
[07/16/2020 14:12:59 > b1b2b5: SYS INFO] Status changed to Running
[07/16/2020 14:12:59 > b1b2b5: INFO]
[07/16/2020 14:12:59 > b1b2b5: INFO] D:\local\Temp\jobs\triggered\UserLogin\esnwqt2o.nav>dotnet UserLogin.dll
[07/16/2020 14:12:59 > b1b2b5: ERR ] Unhandled exception. OpenQA.Selenium.DriverServiceNotFoundException: The chromedriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html.
[07/16/2020 14:12:59 > b1b2b5: ERR ] at OpenQA.Selenium.DriverService.FindDriverServiceExecutable(String executableName, Uri downloadUrl)
[07/16/2020 14:12:59 > b1b2b5: ERR ] at OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService()
[07/16/2020 14:12:59 > b1b2b5: ERR ] at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
[07/16/2020 14:12:59 > b1b2b5: ERR ] at OpenQA.Selenium.Chrome.ChromeDriver..ctor()
[07/16/2020 14:12:59 > b1b2b5: ERR ] at UserLogin.Program.Main(String[] args) in C:\Users\Anneline\source\repos\UserLogin\UserLogin\Program.cs:line 20
[07/16/2020 14:12:59 > b1b2b5: SYS INFO] Status changed to Failed
[07/16/2020 14:12:59 > b1b2b5: SYS ERR ] Job failed due to exit code -532462766

最佳答案

由于找不到 chromedriver.exe,因此失败。将以下 ChromeDriver Nuget 包安装到您的测试解决方案 - enter image description here

在代理中构建测试解决方案之前,请运行“dotnet Restore”。

将驱动程序初始化为 -

var driver = new ChromeDriver(); //using OpenQA.Selenium.Chrome namespace

更多详细信息请点击此处 - https://learn.microsoft.com/en-us/azure/devops/pipelines/test/continuous-test-selenium?view=azure-devops#create-your-test-project

关于azure - Azure DevOps 中的错误日志中出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62937374/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com