When I run ant targets through Selenium grid, I'm able to launch all targets in parallel. If I close any of the Firefox session before completion of execution. I get:
ERROR Server Exception: sessionId fc89c194951a4790bce8418dac7d5ceb doesn't exist;
perhaps this session was already stopped?
[java] at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
[java] at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
[java] at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:262)
[java] at com.thoughtworks.selenium.HttpCommandProcessor.getStringArray(HttpCommandProcessor.java:271)
[java] at com.thoughtworks.selenium.DefaultSelenium.getAllWindowTitles(DefaultSelenium.java:567)
[java] at com.operative.qa.automation.util.URLTestContext.seleniumStart(URLTestContext.java:232)
[java] at com.operative.qa.automation.util.URLTestContext.CommonLogin(URLTestContext.java:66)
[java] at com.operative.qa.automation.main.AutomationFileSequence.main(AutomationFileSequence.java:86)
[java] java.lang.NullPointerException
[java] at com.operative.qa.automation.util.URLTestContext.CommonLogin(URLTestContext.java:78)
[java] at com.operative.qa.automation.main.AutomationFileSequence.main(AutomationFileSequence.java:86)
[java] com.thoughtworks.selenium.SeleniumException:
org%2Eopenqa%2Egrid%2Ecommon%2Eexception%2EGridException%3A+Session+
%5Bfc89c194951a4790bce8418dac7d5ceb%5D+not+available+%2D+%5Bext%2E+
key+1a83ce8d23284bc0ae57545c85f93edf%2C+ext%2E+key+
9de7dcbcdc29438db917d22773cf3598%5D
[java] at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
[java] at com.thoughtworks.selenium.HttpCommandProcessor.getCommandResponseAsString(HttpCommandProcessor.java:168)
[java] at com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:104)
[java] at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:86)
[java] at com.thoughtworks.selenium.HttpCommandProcessor.stop(HttpCommandProcessor.java:252)
[java] at com.thoughtworks.selenium.DefaultSelenium.stop(DefaultSelenium.java:112)
[java] at com.operative.qa.automation.util.URLTestContext.stop(URLTestContext.java:268)
[java] at com.operative.qa.automation.main.AutomationFileSequence.main(AutomationFileSequence.java:114)
How can I solve this problem?
Is there a way to stop the Selenium session. Sometimes, if I manually close Firefox browser to stop execution and shut down server. Still, the execution continues and mark all test cases as fail. How to get rid of this?
I'm using: Selenium RC with grid 2
Closing browsers doesn't stop execution. You have to stop it with whatever program you use for test starting or with pleaseStop() from RunNotifier.