Unable to run selenium tests for server running in background
Page 1 of 1 • Share •
Unable to run selenium tests for server running in background
I am running my selenium server in background with the help of nssm service. I am running the server at a particular port (11111).
I wrote some unit test in VS 2010 and when I am trying to invoke the selenium service with
it gives me error "Unable to connect to the remote server". Please help.
I wrote some unit test in VS 2010 and when I am trying to invoke the selenium service with
- Code:
selenium = new DefaultSelenium("localhost", 11111, "*iehta", "http://www.google.co.in");
selenium.Start()
it gives me error "Unable to connect to the remote server". Please help.
anj21- Posts: 4
Join date: 2010-12-11
Re: Unable to run selenium tests for server running in background
I think problem with you or port or you have not started the selenium server if using older version.
My advice is to use is to first start your selenium server manually and try to execute the command and see whether are you able to start with this port.
command:
> java -jar selenium-server.jar -interactive -port 11111
If server will start , conrgrats your port is working fine. now type the following commands:
cmd=getNewBroserSession&1=*iehta&2=http://www.google.co.in
cmd=open&1=http://www.google.co.in
If all will works then your selenium server is working fine. may be you forgot something to attach like jar or specific in your ide.
Hope this will help. Best of luck.
My advice is to use is to first start your selenium server manually and try to execute the command and see whether are you able to start with this port.
command:
> java -jar selenium-server.jar -interactive -port 11111
If server will start , conrgrats your port is working fine. now type the following commands:
cmd=getNewBroserSession&1=*iehta&2=http://www.google.co.in
cmd=open&1=http://www.google.co.in
If all will works then your selenium server is working fine. may be you forgot something to attach like jar or specific in your ide.
Hope this will help. Best of luck.
Re: Unable to run selenium tests for server running in background
Thanks for the reply. I tried to run the selenium server manually with the above command and it ran successfully.
However i cannot get where should I type the commands
cmd=getNewBroserSession&1=*iehta&2=http://www.google.co.in
cmd=open&1=http://www.google.co.in
I tried typing in command window after stopping server with Ctrl+C but did not work.
However i cannot get where should I type the commands
cmd=getNewBroserSession&1=*iehta&2=http://www.google.co.in
cmd=open&1=http://www.google.co.in
I tried typing in command window after stopping server with Ctrl+C but did not work.
anj21- Posts: 4
Join date: 2010-12-11
Re: Unable to run selenium tests for server running in background
after your server start in interactive mode, then you have to type those command there only .
so the server will execute your all command line by line
so the server will execute your all command line by line
Re: Unable to run selenium tests for server running in background
Ok. So here's the output I get after running the command
cmd=getNewBroserSession&1=*iehta&2=http://www.google.co.in 12:01:35.352 INFO - ---> Requesting http://localhost:11111/selenium-server/driver?cmd=getNewBroserSession&1=*iehta&2=http://www.google.co.in&sessionId=12:01:35.415 INFO - Checking Resource aliases 12:01:35.418 INFO - Command request: getNewBroserSession[*iehta, http://www.google.co.in] on session 12:01:35.424 ERROR - Exception running 'getNewBroserSession 'command on session
java.lang.RuntimeException: sessionId doesn't exist; perhaps this session was already stopped?
cmd=open&1=http://www.google.co.in
12:02:17.824 INFO - ---> Requesting http://localhost:11111/selenium-server/driver?cmd=open&1=http://www.google.co.in&sessionId=
12:02:17.832 INFO - Command request: open[http://www.google.co.in, ] on session 12:02:17.832 ERROR - Exception running 'open 'command on session
java.lang.RuntimeException: sessionId doesn't exist; perhaps this session was already stopped?
cmd=getNewBroserSession&1=*iehta&2=http://www.google.co.in 12:01:35.352 INFO - ---> Requesting http://localhost:11111/selenium-server/driver?cmd=getNewBroserSession&1=*iehta&2=http://www.google.co.in&sessionId=12:01:35.415 INFO - Checking Resource aliases 12:01:35.418 INFO - Command request: getNewBroserSession[*iehta, http://www.google.co.in] on session 12:01:35.424 ERROR - Exception running 'getNewBroserSession 'command on session
java.lang.RuntimeException: sessionId doesn't exist; perhaps this session was already stopped?
cmd=open&1=http://www.google.co.in
12:02:17.824 INFO - ---> Requesting http://localhost:11111/selenium-server/driver?cmd=open&1=http://www.google.co.in&sessionId=
12:02:17.832 INFO - Command request: open[http://www.google.co.in, ] on session 12:02:17.832 ERROR - Exception running 'open 'command on session
java.lang.RuntimeException: sessionId doesn't exist; perhaps this session was already stopped?
anj21- Posts: 4
Join date: 2010-12-11
Re: Unable to run selenium tests for server running in background
Sorry one typo error is there, I mistype the browser. Just add 'w' in that and it will sure work.
Re: Unable to run selenium tests for server running in background
Running the command worked and a new browser window was opening. However when my server runs in background and I typed
awstat -a
I could not see port 11111 in the list. That means my port is not being listened to. Any help in this?
awstat -a
I could not see port 11111 in the list. That means my port is not being listened to. Any help in this?
anj21- Posts: 4
Join date: 2010-12-11
Selenium RC not Working in Fedora 12
Hi Friends,
According to your Suggestion I Run the interactive shell and reach there and give first command as
you say: cmd=getNewBrowserSession&1=*iehta&2=http://www.google.co.in But
I got Result a response code of 500 like Below:
How this problem can remedy, the selenium RC is running fine , but the problem is that, I am working in
Fedora core 12 box. Waiting your Fast Reply
Thankfully
Anes P.A
According to your Suggestion I Run the interactive shell and reach there and give first command as
you say: cmd=getNewBrowserSession&1=*iehta&2=http://www.google.co.in But
I got Result a response code of 500 like Below:
- Code:
10:08:10.958 INFO - ---> Requesting http://localhost:11111/selenium-server/driver?cmd=getNewBrowserSession&1=*iehta&2=http://www.google.co.in
10:08:10.967 INFO - Command request: getNewBrowserSession[*iehta, http://www.google.co.in] on session null
10:08:10.967 INFO - creating new remote session
10:08:10.971 WARN - GET /selenium-server/driver/?cmd=getNewBrowserSession&1=*iehta&2=http://www.google.co.in HTTP/1.1
java.lang.RuntimeException: SystemRoot apparently not set!
at org.openqa.selenium.server.browserlaunchers.WindowsUtils.findSystemRoot(WindowsUtils.java:275)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.findHTALaunchLocation(HTABrowserLauncher.java:42)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.<init>(HTABrowserLauncher.java:28)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.createBrowserLauncher(BrowserLauncherFactory.java:124)
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.getBrowserLauncher(BrowserLauncherFactory.java:81)
at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:307)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:113)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:78)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:653)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:410)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:388)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:135)
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)
Server returned HTTP response code: 500 for URL: http://localhost:11111/selenium-server/driver/?cmd=getNewBrowserSession&1=*iehta&2=http://www.google.co.in
How this problem can remedy, the selenium RC is running fine , but the problem is that, I am working in
Fedora core 12 box. Waiting your Fast Reply
Thankfully
Anes P.A
admod- Posts: 4
Join date: 2010-09-29
Similar topics» Nimbuzz Server
» Selenium Tests with Opera not clicking buttons
» Start Selenium RC server with cmd line option that never stop even it encounters error
» could not connect to selenium rc server
» Trouble starting Selenium RC Server 2.5.0 It starts on 32 bit windows but not on 64 bit windows
» Selenium Tests with Opera not clicking buttons
» Start Selenium RC server with cmd line option that never stop even it encounters error
» could not connect to selenium rc server
» Trouble starting Selenium RC Server 2.5.0 It starts on 32 bit windows but not on 64 bit windows
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum

» sample webdriver code for php users
» which standalone server to use
» Dynamic Drop Down Selection
» It is possible to find list of all URL's exist in any web page in selenium ide
» It is possible to compare 2 same images in selenium IDE.
» how to compare 2 ULR's which is exist in same web page (View page source).
» Web Driver: Unable to click a link present inside the frame of a frameset
» Help me to get dynamicaly loaded options of dropdown in Selenium RC -Junit test case