2016-07-29 2 views
2

그래서 NUnit Seleniumt 테스트를 우리 팀의 tfs에 넣었습니다. Visual Studio Tests로 빌드하고 실행하도록 구성했습니다. VsoAgent를 대화식으로 구성했습니다. 내 테스트를 실행하기 시작하지만, 크롬을 연 후 나는 크롬 자동화 확장의 작동이 중지되었습니다 것을 의사 소통을보고 오류가 발생합니다 : 셀프 테스트를 tfs와 통합

OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:54836/session timed out after 60 seconds. 
----> System.Net.WebException : The operation has timed out 
TearDown : System.NullReferenceException : Object reference not set to an instance of an object. 
Stack Trace: 
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request) 
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute) 
at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute) 
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) 
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) 
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) 
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options) 
at SeleniumBase.Selenium_base.setUp(Browsers browser, String URL, Int32 waitMillis) in C:\TFS\agent3\_work\1\s\PentaJPKSelenium\Selenium_base.cs:line 38 
at PentaJPKBase.PentaJPK_base.SetupTest() in C:\TFS\agent3\_work\1\s\PentaJPKSelenium\PentaJPKSelenium_base.cs:line 17 
--WebException 
at System.Net.HttpWebRequest.GetResponse() 
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request) 
--TearDown 
at PentaJPKBase.PentaJPK_base.TeardownTest() in C:\TFS\agent3\_work\1\s\PentaJPKSelenium\PentaJPKSelenium_base.cs:line 54Error: Exception NUnit.Core.UnsupportedFrameworkException, Exception thrown executing tests in C:\TFS\agent3\_work\1\s\PentaJPKSelenium\bin\Debug\PentaJPKSelenium.dll 

내가 로컬로 실행

이 아니라 에이전트를 통해, 모든 것이 제대로 작동. 누구든지이 문제를 해결하는 방법을 알고 있습니까? 문제 좁힐 방법을 아래에

답변

1

내가 찾는 시간 후 soulution을 발견으로 살펴. 최신 버전의 Chrome에서 ChromeDriver가 최신 버전으로 작동하도록하고 싶습니다. 이 작품을 만든 마법의 라인이었다

ChromeOptions options = new ChromeOptions(); 
options.AddArguments("no-sandbox"); <-------------------------- 
driver = new ChromeDriver(options); 

이 라인은 그가 VSO 에이전트를 사용하여 처리 할 수없는 사용자 시스템으로 크롬을 열려고에서 ChromeDriver을 중단했다.

+0

위대한 발견, 작품 취급. – dove

+0

나는 당신이 정확히 무엇을 물었고 정확히 같은 시나리오를 취했을 때 당신도 대답으로 받아 들일 것을 제안합니다. – dove

0

보십시오 :

  • 기본값 변경 (60 초) 드라이버 시간 제한, 파이어 폭스 드라이버를 드라이버를 변경 운전자의 생성자

  • 에 더 많은 시간을 설정

  • Selenium Webdriver Nuget 패키지를 최신 버전으로 업그레이드

  • 빌드 에이전트에서 방화벽을 비활성화하십시오.

또한 비슷한 질문 Selenium WebDriver throws Timeout exceptions sporadically & OpenQA.Selenium.WebDriverException : No response from server for url

관련 문제