Selenium – Problem running Selenium-RC

selenium

I have Selenium running under Cruise Control to test our site once a day. On Saturday Selenium started throwing the error below.

No code was changed between the tests running sucessfully on Friday night. Also, the same thing has happened on three different machines so I assume it must be something on the machine such as windows updates. I can't see that any were deployed though.

How would I go about debugging this?

java -jar selenium-server.jar -port 4445

14:00:35.375 INFO - Java: Sun Microsystems Inc. 14.3-b01
14:00:35.375 INFO - OS: Windows 2003 5.2 x86
14:00:35.390 INFO - v1.0 [2677], with Core v@VERSION@ [@REVISION@]
14:00:35.500 INFO - Version Jetty/5.1.x
14:00:35.500 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
14:00:35.515 INFO - Started HttpContext[/selenium-server,/selenium-server]
14:00:35.515 INFO - Started HttpContext[/,/]
14:00:35.531 INFO - Started SocketListener on 0.0.0.0:4445
14:00:35.546 INFO - Started org.mortbay.jetty.Server@dbe178
14:00:42.812 INFO - Checking Resource aliases
14:00:42.843 INFO - Command request: getNewBrowserSession[*iexplore, http://test.com/, ] on session null
14:00:42.859 INFO - creating new remote session
14:00:42.968 INFO - Allocated session 1e1f23e664184a3ebdd30c06c4759960 for http://test.com/, launching...

14:00:42.968 ERROR - Failed to start new browser session, shutdown browser and clear all session data
java.lang.IllegalArgumentException: Resource not found: /core
        at org.openqa.selenium.server.browserlaunchers.ResourceExtractor.extractResourcePath(ResourceExtractor.java:39)
        at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.createHTAFiles(HTABrowserLauncher.java:85)
        at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.launch(HTABrowserLauncher.java:60)
        at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.launchRemoteSession(HTABrowserLauncher.java:140)
        at org.openqa.selenium.server.browserlaunchers.InternetExplorerLauncher.launchRemoteSession(InternetExplorerLauncher.java:77)
        at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:357)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:122)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:84)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:697)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:394)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:365)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:126)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
14:00:42.968 INFO - Got result: Failed to start new browser session: Error while
 launching browser on session null
14:00:43.046 INFO - Command request: testComplete[, ] on session null
14:00:43.046 INFO - Got result: OK on session null

Best Answer

I've had a similar problem. No matter what browser I was trying to launch, it sit there for a while (with the process started, but no visible window), and then eventually fail.This was on Windows 7, executing the tests through java.

It turned out I just needed to end all other browsers. I couldn't have IE, Firefox, or chrome open at the time of testing. Maybe you should try that? Good luck!

Related Topic