Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when browser error in Chrome crashes selenium, Chrome doesn't close #13

Open
Jeff-Symphony opened this issue Feb 11, 2015 · 1 comment

Comments

@Jeff-Symphony
Copy link

When Chrome throws a Element is not clickable at point exception, grunt-protractor-webdriver shuts down the Selenium server (Exception thrown: Going to shut down the Selenium server) but but leaves the Chrome browser still open.

Here are the logs when the test is run through grunt-protractor-webdriver:

Running "protractor_webdriver:start" (protractor_webdriver) task
Starting Selenium server
Started Selenium server: http://127.0.0.1:4444

Running "protractor:auto" (protractor) task
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
Session created: count=1, browserName=chrome
Spec started

  SMOKE-TEST.checkout
    C709: checkout anonymously 
[11:26:05]  DefaultProductPage.clickToCheckout
[11:26:07]  Checkout.toggleUseDifferentAddress()
Exception thrown: Going to shut down the Selenium server
Shutting down Selenium server: http://127.0.0.1:4444
Shut down Selenium server: http://127.0.0.1:4444 (OKOK)
Fatal error: 11:26:09.572 WARN - Exception thrown
org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (71, 892). Other element would receive the click: <div class="complete-checkout">...</div>
  (Session info: chrome=40.0.2214.111)
  (Driver info: chromedriver=2.13.307650 (feffe1dd547ee7b5c16d38784cd0cd679dfd7850),platform=Mac OS X 10.9.5 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 27 milliseconds
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
System info: host: 'MacBook-Pro-3.local', ip: '10.1.10.105', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.8.0_20'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, chrome={userDataDir=/var/folders/wd/ls4blfcn40s57vjyj21_kl800000gp/T/.org.chromium.Chromium.Cg7hbS}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, version=40.0.2214.111, platform=MAC, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 7690102401c8cd0263cd2eb57ebc4e9f
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
  at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
  at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
  at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
  at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:268)
  at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:79)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:483)
  at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement$1.invoke(EventFiringWebDriver.java:331)
  at com.sun.proxy.$Proxy2.click(Unknown Source)
  at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:344)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:483)
  at org.openqa.selenium.remote.server.KnownElements$1.invoke(KnownElements.java:63)
  at com.sun.proxy.$Proxy3.click(Unknown Source)
  at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:29)
  at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:1)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:168)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)

But if I run the test by starting the Selenium server in a different terminal session and don't use grunt-protractor-webdriver, the test still fails with this exception, but protractor still continues executing the rest of the test cases and, more importantly, closes the Chrome instance properly.

@Jeff-Symphony
Copy link
Author

ok, I noticed that I wasn't using the options.keepAlive parameter. That provides a simple work around, but it doesn't resolve the underlying bug when not using it and Chrome not closing properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant