使用:
* Windows 10 Pro
* MicrosoftWebDriver 发布版本 14393
我在使用Edge运行UI测试套件时遇到了问题(而Chrome、Firefox和IE11都可以正常工作)。当在标准的Windows开发环境下运行时,不会出现此问题。只有在尝试在CI(TeamCity)代理上运行这些UI测试时才会出现问题。代理已配置为以Windows服务方式运行。
首先,当代理服务所在账户被赋予管理员权限时,我会收到以下错误信息:
“Microsoft Web Driver不能与内置管理员帐户一起使用或在用户帐户控制关闭时使用。”
浏览器甚至无法启动。经过一段时间的搜索后,我没有找到答案。因此,我删除了管理员权限,并且该消息消失了,但驱动程序仍然在构建阶段失败:
致命错误 OpenQA.Selenium.WebDriverException:意外错误。未知错误 w OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) w OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) w OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) w OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) w OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options) w Learn.UITests.Common.Infrastructure.Selenium.Setup.DriverFactory.CreateDriver(UITestsContext context) w DriverFactory.cs:wiersz 60 w Learn.UITests.Common.Infrastructure.Selenium.ContextBase.OnAssemblyStart() w my_code 24
我实例化Edge驱动程序的方式只是默认的方式:
我在使用Edge运行UI测试套件时遇到了问题(而Chrome、Firefox和IE11都可以正常工作)。当在标准的Windows开发环境下运行时,不会出现此问题。只有在尝试在CI(TeamCity)代理上运行这些UI测试时才会出现问题。代理已配置为以Windows服务方式运行。
首先,当代理服务所在账户被赋予管理员权限时,我会收到以下错误信息:
“Microsoft Web Driver不能与内置管理员帐户一起使用或在用户帐户控制关闭时使用。”
浏览器甚至无法启动。经过一段时间的搜索后,我没有找到答案。因此,我删除了管理员权限,并且该消息消失了,但驱动程序仍然在构建阶段失败:
致命错误 OpenQA.Selenium.WebDriverException:意外错误。未知错误 w OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) w OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) w OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) w OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) w OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options) w Learn.UITests.Common.Infrastructure.Selenium.Setup.DriverFactory.CreateDriver(UITestsContext context) w DriverFactory.cs:wiersz 60 w Learn.UITests.Common.Infrastructure.Selenium.ContextBase.OnAssemblyStart() w my_code 24
我实例化Edge驱动程序的方式只是默认的方式:
var ie11Driver = new InternetExplorerDriver(InternetExplorerDriverService.CreateDefaultService(driverPath));
有人能告诉我如何在后台Windows服务中运行我的Edge UI测试吗(与IE11、Chrome和Firefox相同)?