I am working on selenium test automation. I have been recording test cases in Firefox and exporting the same as JUnit. I invoked the test cases with selenium web driver and run in different browsers. All test cases fail in IE6. But the same cases working fine in IE8 and 9. The issue is related to clicks. Clicks are not working in IE6, both by XPath and CSSpath.
I have tried the following code to invoke a click on same elements but it fails with error:
selenium.click("link=Advanced Search");
//selenium.click("xpath=//*[#id='simpleSearch']/a");
//selenium.click("css=div.cm>form#distributions>div#distributionsTab.bd>div#simpleSearch.mtm>a.mlm");
StackTrace:
com.thoughtworks.selenium.SeleniumException: JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 15 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_24'
Session ID: d90dd5dc-7800-4674-ba89-a159a820128b
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, cssSelectorsEnabled=true, handlesAlerts=true, browserName=internet explorer, nativeEvents=true, takesScreenshot=true, version=6}]
at org.openqa.selenium.internal.seleniumemulation.SeleneseCommand.apply(SeleneseCommand.java:44)
at org.openqa.selenium.internal.seleniumemulation.Timer.run(Timer.java:40)
at org.openqa.selenium.WebDriverCommandProcessor.execute(WebDriverCommandProcessor.java:138)
at org.openqa.selenium.WebDriverCommandProcessor.doCommand(WebDriverCommandProcessor.java:68)
at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:193)
at com.magicbox.testsuite.MagicBoxTestSuite.MotelTie6(MagicBoxTestSuite.java:26)
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.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.InvokeMethod.evaluate(InvokeMethod.java:21)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:29)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:47)
at org.junit.rules.RunRules.evaluate(RunRules.java:19)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:232)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:61)
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:223)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.junit.runners.Suite.runChild(Suite.java:129)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:232)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:61)
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:223)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:684)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.openqa.selenium.WebDriverException: JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 15 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_24'
Session ID: d90dd5dc-7800-4674-ba89-a159a820128b
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, cssSelectorsEnabled=true, handlesAlerts=true, browserName=internet explorer, nativeEvents=true, takesScreenshot=true, version=6}]
According do their website Internet Explorer Driver, they do.
Related
I am new to Automation and trying to learn Automation as a manual tester. I am trying to execute a simple java code to open a Chrome browser using Selenium Webdrivers and get the below exception. Tried all possible ways to resolve the same and still nothing works. Any help would really help. Thanks.
Starting ChromeDriver 2.28.455520 (cc17746adff54984afff480136733114c6b3704b) on port 3527
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.28.455520 (cc17746adff54984afff480136733114c6b3704b),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 4.67 seconds
Build info: version: '2.51.0', revision: '1af067d', time: '2016-02-05 19:11:55'
System info: host: 'BTP196816', ip: '10.241.51.20', os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.7.0_99'
Driver info: org.openqa.selenium.chrome.ChromeDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)
at OpenAdf.LaunchAdf.main(LaunchAdf.java:11)
try using that :
System.setProperty("webdriver.chrome.driver", "C:\\SeleniumDrivers\\chromedriver_win32\\chromedriver.exe");
DesiredCapabilities capability = new DesiredCapabilities();
capability.setCapability("binary", "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe");
WebDriver driver = new ChromeDriver(capability);
You can also try
capability.setCapability("chrome.binary", "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe");
Hope it helps.
System.setProperty("webdriver.chrome.driver", "C:\\SeleniumDrivers\\chromedriver_win32\\chromedriver.exe");
Need to set the chrome driver path and the chrome driver path must be at the location which you gave in the code.
I'm not able to select any dropdown in firefox browser when using selenium 3 beta 2. I'm getting :
element not visible exception
Here are some more details:
StackError:
org.openqa.selenium.ElementNotVisibleException: Element is not visible (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 15 milliseconds
Build info: version: 'unknown', revision: '2aa21c1', time: '2016-08-02 14:59:43 -0700'
System info: host: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, appBuildId=20160817112116, version=, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, browserVersion=48.0.1, platformVersion=10.0, browserName=Firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=Windows_NT, device=desktop}]
Session ID: 1bdaa5b9-a2b8-47aa-81b8-5516c39462a7
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:683)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:319)
at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:85)
at org.openqa.selenium.support.ui.Select.setSelected(Select.java:324)
at org.openqa.selenium.support.ui.Select.selectByValue(Select.java:201)
at DriverTest.test(DriverTest.java:45)
While for chrome browser, it is perfectly working fine.
I think there is some issue with firefox browser. Currently i can see that firefox can be updated to 48.0.2. Do we have a fix for this yet?
You should use WebDriverWait if you are not using it.With WebDriverWait the code should be like
Select sel = new Select(new WebDriverWait(driver,30).until(ExpectedConditions.visibilityOfElementLocated(By.name("country"))));
sel.selectByVisibleText("Albania");
I'm working on fixing issues with Selenium tests designed to test submitting a review in a number of categories on a website, and I'm running into a problem with the connection dropping while a request is being performed. The errors seem to be nondeterministic- they don't always occur, and happen before the set timeout for a given action. I'm running the Selenium hub on a CentOS virtual machine (on my local machine), which seems to make network issues unlikely, since the webserver is running locally on my machine as well. I'm running into two main exceptions: "Error communicating with the remote browser. It may have died.", and CLIENT_GONE. I've included a sample of each of them below. If I run the tests 50 times, they might fail on anywhere from 10-30% of the time, while the rest of the time they run without an issue. Is there something I'm missing relating to the virtualbox connection, or how I could be using Selenium? Thanks in advance.
Stack trace for the UnreachableBrowserException:
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.5.0-49-generic', java.version: '1.7.0_60'
Driver info: driver.version: CoreDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:569)
at org.openqa.selenium.remote.RemoteWebDriver.getPageSource(RemoteWebDriver.java:414)
at org.openqa.selenium.remote.Augmenter$CompoundHandler.intercept(Augmenter.java:280)
at org.openqa.selenium.remote.RemoteWebDriver$$EnhancerByCGLIB$$58bad765.getPageSource(<generated>)
at com.foo.selenium.CoreDriver.captureScreenAndSource(CoreDriver.java:537)
at com.foo.selenium.CoreDriver.captureScreenAndSource(CoreDriver.java:513)
at com.foo.selenium.CoreDriver.captureScreenAndSource(CoreDriver.java:497)
at com.foo.selenium.CoreDriver.waitForElementToAppearInElementByLocator(CoreDriver.java:378)
at com.foo.selenium.CoreDriver.waitForElementToAppearInElementByLocator(CoreDriver.java:343)
at com.foo.bar.reviewtest.ResponseTest.verifyResponse(ResponseTest.java:121)
at com.foo.bar.reviewtest.ResponseTest.runATest(ResponseTest.java:48)
at com.foo.bar.reviewtest.UserTestBase.testDriver(UserTestBase.java:129)
Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 1207803; received: 0
at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:184)
at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:204)
at org.apache.http.impl.io.ContentLengthInputStream.close(ContentLengthInputStream.java:108)
at org.apache.http.conn.BasicManagedEntity.streamClosed(BasicManagedEntity.java:157)
at org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:237)
at org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.java:186)
at org.apache.http.util.EntityUtils.consume(EntityUtils.java:85)
at org.openqa.selenium.remote.HttpCommandExecutor$EntityWithEncoding.<init>(HttpCommandExecutor.java:412)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:300)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:527)
... 39 more
... Removed 27 stack frames
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.5.0-49-generic', java.version: '1.7.0_60'
Driver info: driver.version: CoreDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:569)
at org.openqa.selenium.remote.RemoteWebDriver.getPageSource(RemoteWebDriver.java:414)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.openqa.selenium.remote.Augmenter$CompoundHandler.intercept(Augmenter.java:280)
at org.openqa.selenium.remote.RemoteWebDriver$$EnhancerByCGLIB$$58bad765.getPageSource(<generated>)
at com.foo.selenium.CoreDriver.captureScreenAndSource(CoreDriver.java:537)
at com.foo.selenium.CoreDriver.captureScreenAndSource(CoreDriver.java:513)
at com.foo.selenium.CoreDriver.captureScreenAndSource(CoreDriver.java:497)
at com.foo.selenium.CoreDriver.waitForElementToAppearInElementByLocator(CoreDriver.java:378)
at com.foo.selenium.CoreDriver.waitForElementToAppearInElementByLocator(CoreDriver.java:343)
at com.foo.bar.reviewtest.ResponseTest.verifyResponse(ResponseTest.java:121)
at com.foo.bar.reviewtest.ResponseTest.runATest(ResponseTest.java:48)
at com.foo.bar.reviewtest.UserTestBase.testDriver(UserTestBase.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.TestNG.privateMain(TestNG.java:1338)
at org.testng.TestNG.main(TestNG.java:1307)
Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 1207803; received: 0
at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:184)
at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:204)
at org.apache.http.impl.io.ContentLengthInputStream.close(ContentLengthInputStream.java:108)
at org.apache.http.conn.BasicManagedEntity.streamClosed(BasicManagedEntity.java:157)
at org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:237)
at org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.java:186)
at org.apache.http.util.EntityUtils.consume(EntityUtils.java:85)
at org.openqa.selenium.remote.HttpCommandExecutor$EntityWithEncoding.<init>(HttpCommandExecutor.java:412)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:300)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:527)
... 39 more
And the second error:
org.openqa.selenium.WebDriverException: Session [fa85a873-517b-4054-8690-cccc02e17f41] was terminated due to CLIENT_GONE
Command duration or timeout: 2.56 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.5.0-49-generic', java.version: '1.7.0_60'
Session ID: fa85a873-517b-4054-8690-cccc02e17f41
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{platform=LINUX, chrome.chromedriverVersion=26.0.1383.0, acceptSslCerts=false, javascriptEnabled=true, browserName=chrome, rotatable=false, locationContextEnabled=false, webdriver.remote.sessionid=fa85a873-517b-4054-8690-cccc02e17f41, version=26.0.1410.63, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true, webStorageEnabled=true, applicationCacheEnabled=false, takesScreenshot=true}]
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:348)
at org.openqa.selenium.By$ById.findElement(By.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
at org.openqa.selenium.remote.Augmenter$CompoundHandler.intercept(Augmenter.java:280)
at org.openqa.selenium.remote.RemoteWebDriver$$EnhancerByCGLIB$$29d6fa2e.findElement(<generated>)
at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:523)
at org.openqa.selenium.support.ui.ExpectedConditions.access$0(ExpectedConditions.java:521)
at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:289)
at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:1)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
at com.tools.selenium.CoreDriver.waitForElementToBeInvisible(CoreDriver.java:300)
at com.tools.selenium.CoreDriver.waitForElementToBeInvisible(CoreDriver.java:288)
at com.foo.bar.reviewtest.ResponseTest.loginOnVisit(ResponseTest.java:55)
at com.foo.bar.reviewtest.ResponseTest.runATest(ResponseTest.java:44)
at com.foo.bar.reviewtest.UserTestBase.testDriver(UserTestBase.java:129)
Caused by: org.openqa.grid.common.exception.GridException: Session [fa85a873-517b-4054-8690-cccc02e17f41] was terminated due to CLIENT_GONE
at org.openqa.grid.internal.ActiveTestSessions.getExistingSession(ActiveTestSessions.java:104)
at org.openqa.grid.internal.Registry.getExistingSession(Registry.java:423)
at org.openqa.grid.web.servlet.handler.RequestHandler.getSession(RequestHandler.java:234)
at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:116)
at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:84)
at org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.seleniumhq.jetty7.servlet.ServletHolder.handle(ServletHolder.java:565)
at org.seleniumhq.jetty7.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at org.seleniumhq.jetty7.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at org.seleniumhq.jetty7.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at org.seleniumhq.jetty7.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.seleniumhq.jetty7.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.seleniumhq.jetty7.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at org.seleniumhq.jetty7.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.seleniumhq.jetty7.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.seleniumhq.jetty7.server.Server.handle(Server.java:349)
at org.seleniumhq.jetty7.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
at org.seleniumhq.jetty7.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at org.seleniumhq.jetty7.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894)
at org.seleniumhq.jetty7.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948)
at org.seleniumhq.jetty7.http.HttpParser.parseNext(HttpParser.java:857)
at org.seleniumhq.jetty7.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.seleniumhq.jetty7.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at org.seleniumhq.jetty7.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at org.seleniumhq.jetty7.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.seleniumhq.jetty7.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:722)
... Removed 30 stack frames
Did you get anywhere with this issue? I'm seeing the second issue (CLIENT_GONE) very regularly.
We run a suite of Selenium tests (about 200) overnight regularly, and for the past two nights have had hundreds of instances of this.
About 96% of the errors are from
get_PageSource
The vast majority are also taking over 25 minutes to produce this error, so it looks like it might be a timeout issue.
While running my test scripts in win7 IE11 using Selenium WebDriver I am getting below error:
Error:
==============================================================================================
Started InternetExplorerDriver server (64-bit)
2.42.0.0
Listening on port 13127
org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Software
caused connection abort: recv failed
org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 169 milliseconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'blr2261913', ip: '10.177.101.114', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_51'
Session ID: 71972154-3b97-4623-b651-aaa0bb460ffb
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSession=f
r=dismiss, version=11, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, handlesAlerts=true,
e, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}]
com.thoughtworks.selenium.SeleniumException: JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 169 milliseconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'blr2261913', ip: '10.177.101.114', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_51'
Session ID: 71972154-3b97-4623-b651-aaa0bb460ffb
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSession=f
r=dismiss, version=11, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, handlesAlerts=true,
e, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}]
at com.thoughtworks.selenium.webdriven.SeleneseCommand.apply(SeleneseCommand.java:44)
at com.thoughtworks.selenium.webdriven.Timer.run(Timer.java:40)
at com.thoughtworks.selenium.webdriven.WebDriverCommandProcessor.execute(WebDriverCommandProcessor.java:143)
at com.thoughtworks.selenium.webdriven.WebDriverCommandProcessor.doCommand(WebDriverCommandProcessor.java:73)
at com.thoughtworks.selenium.DefaultSelenium.type(DefaultSelenium.java:317)
Env: Windows7-64 bit, IE11
IEDriver version: Latest i.e 2.42.0
Selenium Server: 2.41.0
I have already followed the steps mentioned https://code.google.com/p/selenium/wiki/InternetExplorerDriver ! NO LUCK!
Have searched enough over net but could not find any solution to my problem.
Any help will be highly appreciated.
Thanks in advance!
I'm not sure if this applies directly to your problem but I have come across something similar when I got the error:
Caused by: java.net.SocketException: Connection reset
Which lead me to a bug raised here: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7077696
You have recv failed in your error similar to this bug, however it was noted that it's more likely to be Windows Firewall causing the error rather than a bug. Some possible workarounds (from the site):
Run with -Djava.net.preferIPv4Stack=true
Add a firewall exception for the Java binary
Or disable stateful FTP inspection in the firewall
which I believe is done with: netsh advfirewall set global StatefulFTP disable
There is also an issue raised here: https://code.google.com/p/selenium/issues/detail?id=6437
Which applies to the error I have more so but it could possibly apply to yours? As comment #7 (from a project member) states there is a known issue with IE11.
This is may or may not help as I haven't had a chance to test the solutions and I'm not entirely sure of it myself!
I want to enter the captcha text manually so how to write the code for this?
Here is my code:
driver.findElement(By.name("/atg/commerce/order/purchase/CommitOrderFormHandler.userCaptcha")).sendKeys(captcha);
I am getting below error :
Element is not currently visible and so may not be interacted with Command duration or timeout: 9 milliseconds Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:18:15' System info: host: 'WID1376', ip: '172.21.22.76', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_35' Session ID: 65dab209-84aa-436a-915f-7a52174405a5 Driver info: org.openqa.selenium.firefox.FirefoxDriver Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, browserName=firefox, rotatable=false, locationContextEnabled=true, version=23.0, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, browserConnectionEnabled=true, nativeEvents=false, webStorageEnabled=true, applicationCacheEnabled=true, takesScreenshot=true}]
If you want to enter the value manually...place an explicit wait (eg: thread.sleep(20000);) and enter the captcha text manually within 20sec. This may help you. If not read the links provided by TDHM and olyv