views:

2686

answers:

3

I am trying to detect a midair collision problem (simultaneous editin) using selenium.

So I start a selenium session A with following (Super Class)

selenium = new MASSelenium(serverHost, serverPort, *iexplore, browserURL);
selenium.start();
selenium.open("index.cgi");

then I try starting a different selenium session B pointing to a different browser from the superclass (Sub Class):

selenium2 = new MASSelenium(getServerHost(), getServerPort(), *firefox, getBrowserURL());
selenium2.start();
selenium2.open("index.cgi");

It works fine on my local machine (behaves as expected) but then when i run this same test on a remote machine (using bamboo build tool), i get this exception:

java.lang.RuntimeException: Could not start Selenium session: Internal Server Error
    at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:89)
    at gov.baba.arc.mas.selenium.tests.SimultaneousEditingConflictDetected.setUp(SimultaneousEditingConflictDetected.java:78)
Caused by: com.thoughtworks.selenium.SeleniumException: Internal Server Error
    at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
    at com.thoughtworks.selenium.HttpCommandProcessor.getCommandResponseAsString(HttpCommandProcessor.java:168)
    at com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:104)
    at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:86)

Any idea why this is happening?

A: 

Is there anything more in the logs can you share? Unfortunately, that information just isn't enough. Specifically, logs from the Selenium Server would be much more helpful than the logs from the JUnit client side.

Patrick Lightbody
A: 

Hi Patrick,

I too have similar experiance while executing Test suite which is build using Selenium, java, testNG. I have exactly similar observation as that of above post, which is when test get executed using ant builds, it randomly fails with this Exception thrown.

But In my case this exception is thrown in Tear down of Test.

Error which I get is as follows

com.thoughtworks.selenium.SeleniumException: Internal Server Error at com.thoughtworks.selenium.HttpCommandProcessor.getCommandResponse(HttpCommandProcessor.java:130) at com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:85) at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:71) at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:83 at com.XXXXX.uitests.library.BaseUtil.clickNoPageLoad(BaseUtil.java:118) at com.XXXXX.uitests.library.BaseUtil.clickNoPageLoad(BaseUtil.java:102)

Please share your thoughts on this. Ruturaj

A: 

Check your parameter browserURL. Maybe it is malformed? It should contain protocol like "http://google.com"

Numie