Selenium RC htmlsuite error
I am trying to use Selenium RC but i keep getting this error whenever i start the server.
The command i use is
java -jar selenium-server.jar -multiwindow -htmlsuite *iexplore http://localhost/app testsuite.html testsuiteoutfile.html
Starting Selenium Server....
18:14:29.086 INFO - Java: Sun Microsystems Inc. 10.0-b23
18:14:29.086 INFO - OS: Windows XP 5.1 x86
18:14:29.102 INFO - v2.0 [a2], with Core v2.0 [a2]
18:14:29.227 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
18:14:29.227 INFO - Version Jetty/5.1.x
18:14:29.242 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
18:14:29.242 INFO - Started HttpContext[/selenium-server,/selenium-server]
18:14:29.242 INFO - Started HttpContext[/,/]
18:14:29.336 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@2bbd86
18:14:29.352 INFO - Started HttpContext[/wd,/wd]
18:14:29.367 INFO - Started SocketListener on 0.0.0.0:4444
18:14:29.367 INFO - Started org.openqa.jetty.jetty.Server@14ed9ff
HTML suite exception seen:
java.lang.RuntimeException: sessionId 69367 doesn't exist; perhaps this session was already stopped?
at org.openqa.selenium.server.FrameGroupCommandQueueSet.getQueueSet(FrameGroupCommandQueueSet.java:220)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.writeSessionExtensionJs(HTABrowserLauncher.java:117)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.createHTAFiles(HTABrowserLauncher.java:102)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.launch(HTABrowserLauncher.java:63)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.launchHTMLSuite(HTABrowserLauncher.java:155)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:121)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:166)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:545)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:239)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:198)
18:14:30.320 INFO - Shutting down...
I tried to use a different port number and in debug mode and the output is shown here
No there are no other tests or applications running on port 4444. I even tried restarting my machine just to confirm. Here is the error again when i tried to start it using port 6565 and in debug mode
C:\workarea\wip\SeleniumSuite>runenssuite all
Starting Selenium Server....
18:35:06.088 INFO - Java: Sun Microsystems Inc. 10.0-b23
18:35:06.104 INFO - OS: Windows XP 5.1 x86
18:35:06.104 INFO - v2.0 [a2], with Core v2.0 [a2]
18:35:06.119 INFO - Selenium server r开发者_StackOverflowunning in debug mode.
18:35:06.135 DEBUG - add component: SocketListener0@0.0.0.0:6565
18:35:06.166 DEBUG - add component: org.openqa.jetty.http.ResourceCache@18a47e0
18:35:06.182 DEBUG - add component: org.openqa.selenium.server.ProxyHandler in HttpContext[/,/]
18:35:06.182 DEBUG - add component: HttpContext[/,/]
18:35:06.182 DEBUG - Added HttpContext[/,/] for host *
18:35:06.182 DEBUG - add component: org.openqa.jetty.http.ResourceCache@89fbe3
18:35:06.197 DEBUG - added SC{BASIC,null,user,CONFIDENTIAL} at /tests/html/basicAuth/*
18:35:06.213 DEBUG - add component: org.openqa.jetty.http.handler.SecurityHandler in HttpContext[/selenium-server,/selenium-server]
18:35:06.213 DEBUG - add component: org.openqa.selenium.server.StaticContentHandler in HttpContext[/selenium-server,/selenium-server]
18:35:06.229 DEBUG - add component: org.openqa.selenium.server.SessionExtensionJsHandler in HttpContext[/selenium-server,/selenium-server]
18:35:06.229 DEBUG - add component: org.openqa.selenium.server.htmlrunner.SingleTestSuiteResourceHandler in HttpContext[/selenium-server,/selenium-ser
ver]
18:35:06.229 DEBUG - add component: org.openqa.selenium.server.htmlrunner.SeleniumHTMLRunnerResultsHandler@1bf6770
18:35:06.244 DEBUG - add component: org.openqa.selenium.server.CachedContentTestHandler@94948a
18:35:06.244 DEBUG - add component: HttpContext[/selenium-server,/selenium-server]
18:35:06.244 DEBUG - Added HttpContext[/selenium-server,/selenium-server] for host *
18:35:06.260 DEBUG - add component: org.openqa.jetty.http.ResourceCache@c51355
18:35:06.276 DEBUG - add component: org.openqa.selenium.server.SeleniumDriverResourceHandler in HttpContext[/selenium-server,/selenium-server]
18:35:06.276 DEBUG - add component: HttpContext[/selenium-server/driver,/selenium-server/driver]
18:35:06.291 DEBUG - Added HttpContext[/selenium-server/driver,/selenium-server/driver] for host *
18:35:06.291 DEBUG - add component: org.openqa.jetty.http.ResourceCache@253498
18:35:06.307 DEBUG - add component: WebDriver remote server
18:35:06.322 DEBUG - add component: org.openqa.jetty.jetty.servlet.HashSessionManager@16930e2
18:35:06.322 DEBUG - add component: org.openqa.jetty.jetty.servlet.ServletHandler@108786b
18:35:06.354 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:6565/wd/hub
18:35:06.354 DEBUG - add component: HttpContext[/wd,/wd]
18:35:06.354 DEBUG - Added HttpContext[/wd,/wd] for host *
18:35:06.369 DEBUG - Starting org.openqa.jetty.jetty.Server@18eb9e6
18:35:06.369 INFO - Version Jetty/5.1.x
18:35:06.369 DEBUG - LISTENERS: [SocketListener0@0.0.0.0:6565]
18:35:06.385 DEBUG - HANDLER: {null={/selenium-server/driver/*=[HttpContext[/selenium-server/driver,/selenium-server/driver]], /selenium-server/*=[Htt
pContext[/selenium-server,/selenium-server]], /=[HttpContext[/,/]], /wd/*=[HttpContext[/wd,/wd]]}}
18:35:06.385 DEBUG - Starting HttpContext[/selenium-server/driver,/selenium-server/driver]
18:35:06.385 DEBUG - Init classloader from null, sun.misc.Launcher$AppClassLoader@11b86e7 for HttpContext[/selenium-server/driver,/selenium-server/dri
ver]
18:35:06.401 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
18:35:06.401 DEBUG - Starting HttpContext[/selenium-server,/selenium-server]
18:35:06.401 DEBUG - Init classloader from null, sun.misc.Launcher$AppClassLoader@11b86e7 for HttpContext[/selenium-server,/selenium-server]
18:35:06.416 DEBUG - Started org.openqa.jetty.http.handler.SecurityHandler in HttpContext[/selenium-server,/selenium-server]
18:35:06.416 DEBUG - Started org.openqa.selenium.server.StaticContentHandler in HttpContext[/selenium-server,/selenium-server]
18:35:06.416 DEBUG - Started org.openqa.selenium.server.SessionExtensionJsHandler in HttpContext[/selenium-server,/selenium-server]
18:35:06.416 DEBUG - Started org.openqa.selenium.server.htmlrunner.SingleTestSuiteResourceHandler in HttpContext[/selenium-server,/selenium-server]
18:35:06.432 DEBUG - Started org.openqa.selenium.server.SeleniumDriverResourceHandler in HttpContext[/selenium-server,/selenium-server]
18:35:06.432 INFO - Started HttpContext[/selenium-server,/selenium-server]
18:35:06.432 DEBUG - Starting HttpContext[/,/]
18:35:06.432 DEBUG - Init classloader from null, sun.misc.Launcher$AppClassLoader@11b86e7 for HttpContext[/,/]
18:35:06.447 DEBUG - Started org.openqa.selenium.server.ProxyHandler in HttpContext[/,/]
18:35:06.447 INFO - Started HttpContext[/,/]
18:35:06.447 DEBUG - Starting HttpContext[/wd,/wd]
18:35:06.447 DEBUG - Init classloader from null, sun.misc.Launcher$AppClassLoader@11b86e7 for HttpContext[/wd,/wd]
18:35:06.463 DEBUG - Starting org.openqa.jetty.jetty.servlet.ServletHandler@108786b
18:35:06.463 DEBUG - New random session seed
18:35:06.557 DEBUG - Started holder of class org.openqa.selenium.remote.server.DriverServlet
18:35:06.557 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@108786b
18:35:06.572 INFO - Started HttpContext[/wd,/wd]
18:35:06.572 DEBUG - Session scavenger period = 30s
18:35:06.588 INFO - Started SocketListener on 0.0.0.0:6565
18:35:06.588 INFO - Started org.openqa.jetty.jetty.Server@18eb9e6
18:35:06.604 DEBUG - Requested browser string '*iehta' matches *iehta
18:35:06.697 DEBUG - Extracting /core to c:\DOCUME~1\702723~1\LOCALS~1\Temp\customProfileDir306604\core
HTML suite exception seen:
java.lang.RuntimeException: sessionId 306604 doesn't exist; perhaps this session was already stopped?
at org.openqa.selenium.server.FrameGroupCommandQueueSet.getQueueSet(FrameGroupCommandQueueSet.java:220)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.writeSessionExtensionJs(HTABrowserLauncher.java:117)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.createHTAFiles(HTABrowserLauncher.java:102)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.launch(HTABrowserLauncher.java:63)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.launchHTMLSuite(HTABrowserLauncher.java:155)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:121)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:166)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:545)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:239)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:198)
C:\workarea\wip\SeleniumSuite>
Update #19:37 OK another update - if i change the browser from *iexplore to *iexploreproxy it seems to work. Is there any reason for this?
Update #21:45 I tried to donwload an older version of Selenium RC and the older version (0.9.2) works fine. Its possible that this is something that affects just the new version.
An observation is noted in the command used to run your html suite: can you try the following command:
java -jar selenium-server.jar -htmlSuite *iexplore "http://localhost/app" "testsuite.html" "testsuiteoutfile.html"
Note1: make sure you are referring to the correct path where your 'testsuite.html' is located. Eg: "C:\testsuite.html"
Note2: Same applies for the output file too, make sure you refer to the specific directory where you want to save your result.
精彩评论