problem running remote control in interactive mode

32 views
Skip to first unread message

Manisha

unread,
May 19, 2006, 4:06:43 PM5/19/06
to selenium-users...@googlegroups.com
Hi Everyone

I was trying to run Selenium Remote control in interactive mode, I am haveing some problems

System:
Windows XP java version 1.5.0_02

1.Download RC.zip
2.On cmd line go to the Selenium-Server.jar folder
3.Type java -jar Selenium-Server.jar -interactive
4.The interactive mode starts however I get the following errors

Entering interactive mode... type Selenium commands here (e.g: cmd=open&1=http:/
/www.yahoo.com)
cmd=getNewBrowserSession&1=*firefox&2=http://www.google.com
---> Requesting http://localhost:4444/selenium-server/driver?cmd=getNewBrowserSe
ssion&1=*firefox&2=http://www.google.com
java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
urce)
at java.net.URLConnection.getContent(Unknown Source)
at org.openqa.selenium.server.SeleniumServer$3.run(SeleniumServer.java:2
63)
at java.lang.Thread.run(Unknown Source)


Please help!!

rupam

unread,
May 20, 2006, 9:52:10 AM5/20/06
to selenium-users...@googlegroups.com
HI Everybody,
I am having problem in using Remote Control in interactive mode.
I am using Linux-Ferera Core,java version "1.4.2_08"
On giving command java -jar selenium-server.jar -interactive,it asks for Entering interactive mode... type Selenium commands here.
On giving cmd=getNewBrowserSession&1=*/usr/bin/mozilla&2=http://google.com it shows
---> Requesting http://localhost:4444/selenium-server/driver?cmd=getNewBrowserSession&1=*/usr/bin/mozilla&2=http://yahoo.com
queryString = cmd=getNewBrowserSession&1=*/usr/bin/mozilla&2=http://yahoo.com
May 20, 2006 2:33:30 PM org.mortbay.http.HttpConnection exception
WARNING: GET /selenium-server/driver/?cmd=getNewBrowserSession&1=*/usr/bin/mozilla&2=http://yahoo.com HTTP/1.1
java.lang.RuntimeException: java.io.IOException: java.io.IOException: */usr/bin/mozilla: not found
at org.openqa.selenium.server.browserlaunchers.RuntimeExecutingBrowserLauncher.exec(RuntimeExecutingBrowserLauncher.java:45)
at org.openqa.selenium.server.browserlaunchers.RuntimeExecutingBrowserLauncher.launch(RuntimeExecutingBrowserLauncher.java:37)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java[rupam@rupam server]$ java -jar selenium-server.jar -interactive
May 20, 2006 6:21:53 PM org.mortbay.http.HttpServer doStart
INFO: Version Jetty/0.7.1
May 20, 2006 6:21:53 PM org.mortbay.util.Container start
INFO: Started HttpContext[/,/]
May 20, 2006 6:21:53 PM org.mortbay.util.Container start
INFO: Started HttpContext[/selenium-server,/selenium-server]
May 20, 2006 6:21:53 PM org.mortbay.util.Container start
INFO: Started HttpContext[/selenium-server/driver,/selenium-server/driver]
May 20, 2006 6:21:53 PM org.mortbay.http.SocketListener start
INFO: Started SocketListener on 0.0.0.0:4444
May 20, 2006 6:21:53 PM org.mortbay.util.Container start
INFO: Started org.mortbay.jetty.Server@a83b8a
Entering interactive mode... type Selenium commands here (e.g: cmd=open&1=http://www.yahoo.com)
cmd=getNewBrowserSession&1=*/usr/bin/mozilla&2=http://www.google.com
---> Requesting http://localhost:4444/selenium-server/driver?cmd=getNewBrowserSession&1=*/usr/bin/mozilla&2=http://www.google.com
queryString = cmd=getNewBrowserSession&1=*/usr/bin/mozilla&2=http://www.google.com
May 20, 2006 6:22:55 PM org.mortbay.http.HttpConnection exception
WARNING: GET /selenium-server/driver/?cmd=getNewBrowserSession&1=*/usr/bin/mozilla&2=http://www.google.com HTTP/1.1
java.lang.RuntimeException: java.io.IOException: java.io.IOException: */usr/bin/mozilla: not found
at org.openqa.selenium.server.browserlaunchers.RuntimeExecutingBrowserLauncher.exec(RuntimeExecutingBrowserLauncher.java:45)
at org.openqa.selenium.server.browserlaunchers.RuntimeExecutingBrowserLauncher.launch(RuntimeExecutingBrowserLauncher.java:37)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:198)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:133)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:119)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:93)
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)
Caused by: java.io.IOException: java.io.IOException: */usr/bin/mozilla: not found
at java.lang.UNIXProcess.<init>(UNIXProcess.java:143)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at org.openqa.selenium.server.browserlaunchers.RuntimeExecutingBrowserLauncher.exec(RuntimeExecutingBrowserLauncher.java:43)
... 14 more
java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:4444/selenium-server/driver/?cmd=getNewBrowserSession&1=*/usr/bin/mozilla&2=http://www.google.com
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:800)
at java.net.URLConnection.getContent(URLConnection.java:585)
at org.openqa.selenium.server.SeleniumServer$3.run(SeleniumServer.java:263)
at java.lang.Thread.run(Thread.java:534)

Dan Fabulich

unread,
May 20, 2006, 3:42:04 PM5/20/06
to selenium-users...@googlegroups.com
rupam wrote:

> HI Everybody,
> I am having problem in using Remote Control in interactive mode.
> I am using Linux-Ferera Core,java version "1.4.2_08"
> On giving command java -jar selenium-server.jar -interactive,it asks for Entering interactive mode... type Selenium commands here.

> On giving cmd=getNewBrowserSession&1=*/usr/bin/mozilla&2=http://google.com it shows

Nope, that's not the right format for that command. (The next release
will have some better error handling for this case.) The "*" is for
special strings like "*firefox" or "*iexplore"; you're not supposed to use
it to launch your own program like "/usr/bin/mozilla". So in this case,
you really wanted to type:

cmd=getNewBrowserSession&1=/usr/bin/mozilla&2=http://google.com it shows

But that's not all. /usr/bin/mozilla isn't really the right command
either, because that's almost certainly a symlink to a shell script.
You're going to want to follow that symlink, find the shell script, find
the actual -bin file that it intended to launch (probably mozilla-bin) and
launch that directly. You probably want to define the MOZ_NO_REMOTE
environment variable as well while you're at it.n

-Dan


--------------------------------------------------------------------
To unsubscribe, e-mail: selenium-rc-us...@openqa.org
For additional commands, e-mail: selenium-rc...@openqa.org




Reply all
Reply to author
Forward
0 new messages