我正在使用Selenium C#+ LeanFT来自动化Web应用程序。有时在Visual Studio中会出现此错误,并且我不知道为什么。有人可以阐明我该如何处理吗:
初始化WebDriver Chrome时出错->未知错误:无法等待扩展程序后台页面加载:chrome-extension://hpoiplhbnkgnpjkkilfahkkcimachkkj/Agent/Ext/bg-loader.html 从超时 (驱动程序信息:chromedriver = 2.37.543627(63642262d9fb93fb4ab52398be4286d844092a5e),平台= Windows NT 10.0.16299 x86_64)Automation.Test.Framework.Models.Exceptions.AtGenericException:初始化WebDriver Chrome时出错---> System.InvalidOperationException:未知错误:失败等待扩展程序后台页面加载:chrome-extension://hpoiplhbnkgnpjkkilfahkkcimachkkj/Agent/Ext/bg-loader.html 从超时 (驱动程序信息:chromedriver = 2.37.543627(63642262d9fb93fb4ab52398be4286d844092a5e),平台= Windows NT 10.0.16299 x86_64) 在OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) 在OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute,Dictionary`2 parameters) 在OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities wantedCapabilities) 在OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor,ICapabilities requiredCapabilities) 在OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService服务,ChromeOptions选项,TimeSpan命令超时) at Automation.Test.Framework.Decorators.ChromeDriverDecorator..ctor(字符串chromeDriverDirectory,ChromeDriverOptions选项) 在Automation.Test.Framework.Decorators.AtWebDriver.get_GetDriver() ---内部异常堆栈跟踪的结尾--- 在Automation.Test.Framework.Decorators.AtWebDriver.get_GetDriver() 在Symphony.AcceptanceTests.Hooks.TestHook.RegisterAndInitializeWebDriver()中的C:\ Users \ amaddox \ Desktop \ H \ Symphony.AcceptanceTests \ Symphony.AcceptanceTests \ Hooks \ TestHook.cs:line 161 在lambda_method(Closure,IContextManager) 在TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding绑定,IContextManager contextManager,Object []参数,ITestTracer testTracer,TimeSpan&持续时间) 在TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.InvokeHook(IBindingInvoker调用程序,IHookBinding hookBinding,HookType hookType) 在TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireEvents(HookType hookType) 在TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireScenarioEvents(HookType bindingEvent) 在TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnScenarioStart(ScenarioInfo sceneInfo) 在TechTalk.SpecFlow.TestRunner.OnScenarioStart(ScenarioInfo sceneInfo) 在Symphony.AcceptanceTests.Epics.CC_TransitionFiles.Feature._9317_TransitionFilesUploadFeature.ScenarioSetup(ScenarioInfocenarioInfo)中 在Symphony.AcceptanceTests.Epics.CC_TransitionFiles.Feature._9317_TransitionFilesUploadFeature.PBIXXXXBulkUploadStructuredDocs()中的位置C:\ Users \ amaddox \ Desktop \ H \ Symphony.AcceptanceTests \ Symphony.AcceptanceTests \ Epics \ Up_Features \ 93 31 在TechTalk.SpecRun.Framework.TaskExecutors.StaticOrInstanceMethodExecutor.ExecuteInternal(ITestThreadExecutionContext testThreadExecutionContext) 在TechTalk.SpecRun.Framework.TaskExecutors.StaticOrInstanceMethodExecutor.Execute(ITestThreadExecutionContext testThreadExecutionContext) 在TechTalk.SpecRun.Framework.TestAssemblyExecutor.ExecuteTestNodeTask(TestNode testNode,ITaskExecutor任务,TraceEventType eventType)上