WebDriver 테스트 케이스에 이상한 문제가있어 광범위한 오류가 발생했습니다.WebDriver.findElement로 인해 SocketExceptions이 10 초 동안 발생했습니다.
스위트의 테스트 케이스 중 하나가 현재 실패 할 것으로 예상됩니다. 웹 사이트에 탭이 사라지는 열린 버그가 있습니다. 탭을 클릭해야하는 테스트 케이스는 WebDriver의 findElement 메소드를 호출하여 탭을 찾습니다. 이것은 표준 시간 제한을 기다립니다,하지만, 대신에 일반적인 예외를 던지고에서 이동, 나는 일반적으로 오류를 잡아 테스트 케이스 코드에 의해 잡힐하지 않는 콘솔에서 점점 SocketExceptions 시작 :
Apr 18, 2013 8:47:23 AM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: No buffer space available (maximum connections reached?): connect
Apr 18, 2013 8:47:23 AM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
Apr 18, 2013 8:47:23 AM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: No buffer space available (maximum connections reached?): connect
Apr 18, 2013 8:47:23 AM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
Apr 18, 2013 8:47:23 AM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: No buffer space available (maximum connections reached?): connect
Apr 18, 2013 8:47:23 AM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
은 이 빨리 실패 할 각 테스트 케이스가 발생, 약 10 초, 다음 테스트 케이스를 실행하는 모든 시도는 위의 실패를 유발
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 22:18:01'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_32'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:493)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:502)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:372)
at com.brainshark.uitests.common.TestBase.afterClass(TestBase.java:243)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:36)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at com.brainshark.uitests.runners.BrainsharkTestRunner.run(BrainsharkTestRunner.java:51)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.openqa.selenium.remote.HttpCommandExecutor.fallBackExecute(HttpCommandExecutor.java:319)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:297)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.execute(NewProfileExtensionConnection.java:136)
at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.execute(FirefoxDriver.java:357)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:472)
... 32 more
다음 SocketExceptions는 UnreachableBrowserException 원인이됩니다. 그런 다음 마술적인 일이 일어나고 예외가 중지됩니다.
왜이 동작이 표시되는지 아는 사람이 있습니까? 또는 리셋하는 데 10 초가 걸립니다. 이런 상황을 감지하고 다음 테스트 케이스를 실행하기 전에 10 초 동안 기다리려고하면이 문제를 해결해야합니까? 감사!
[this] (https://groups.google.com/forum/#!msg/webdriver/1xLNX06W6Cs/dmkOWAEBYlcJ) (설명 [여기] (http://code.google.com/p/) 셀렌/위키/ScalingWebDriver) 링크가 죽으면). Firefox에서 Chrome 드라이버를 사용하는 것이 가능한 다른 해결 방법이 있습니다. – berbt
Windows 컴퓨터에서 Chrome 드라이버를 사용하는 동안 동일한 문제가 있습니다. Mac에서는 오류가 발생하지 않습니다. 초기 검색에서 Windows의 서비스 팩 문제인 것처럼 보입니까? –