cant get SRC to run

5 views
Skip to first unread message

Christian Kreutzer

unread,
Apr 4, 2006, 6:18:24 PM4/4/06
to selenium-users...@googlegroups.com
Hi,

im new to selenium and wanted to give selenium-rc a try since it sounds very promising. Unfortunately i cant get it to run in either interactive mode nor with the sample ruby/python scripts.

by doing the *' cmd=getNewBrowserSession&1=*iexplore&2=http://www.google.com'* cmd in interactive mode i get the following java exception:

---> Requesting http://localhost:4444/selenium-server/driver?cmd=getNewBrowserSession&1=*iexplore&2=http://www.google.co
m
queryString = cmd=getNewBrowserSession&1=*iexplore&2=http://www.google.com
05.04.2006 00:15:04 org.mortbay.http.HttpConnection exception
WARNUNG: GET /selenium-server/driver/?cmd=getNewBrowserSession&1=*iexplore&2=http://www.google.com HTTP/1.1
java.lang.RuntimeException: Output didn't look right: ! REG.EXE VERSION 3.0

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
AutoConfigURL REG_SZ file://C:/selenium-remote-control-0.7/server/customProfileDir/proxy.pac

at org.openqa.selenium.server.browserlaunchers.WindowsUtils.readStringRegistryValue(WindowsUtils.java:325)
at org.openqa.selenium.server.browserlaunchers.InternetExplorerCustomProxyLauncher.changeRegistrySettings(Intern
etExplorerCustomProxyLauncher.java:103)
at org.openqa.selenium.server.browserlaunchers.InternetExplorerCustomProxyLauncher.launch(InternetExplorerCustom
ProxyLauncher.java:68)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.j
ava:198)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:133)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.j
ava: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)
java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:4444/selenium-server/driver/?cmd=
getNewBrowserSession&1=*iexplore&2=http://www.google.com
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URLConnection.getContent(Unknown Source)
at org.openqa.selenium.server.SeleniumServer$3.run(SeleniumServer.java:263)
at java.lang.Thread.run(Unknown Source)

and by running *selenium_example.rb* i get this exception:

queryString = cmd=getNewBrowserSession&1=%2Afirefox&2=http%3A%2F%2Fwww.irian.at
Preparing Firefox profile...
05.04.2006 00:17:52 org.mortbay.http.HttpConnection exception
WARNUNG: GET /selenium-server/driver/?cmd=getNewBrowserSession&1=%2Afirefox&2=http%3A%2F%2Fwww.irian.at HTTP/1.1
java.lang.RuntimeException: java.io.IOException: CreateProcess: firefox -profile C:\selenium-remote-control-0.7.1\server
\customProfileDir1144189071890 chrome://killff/content/kill.html error=2
at org.openqa.selenium.server.browserlaunchers.FirefoxCustomProfileLauncher.launch(FirefoxCustomProfileLauncher.
java:131)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.j
ava:198)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:133)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.j
ava: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: CreateProcess: firefox -profile C:\selenium-remote-control-0.7.1\server\customProfileDir
1144189071890 chrome://killff/content/kill.html error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Unknown Source)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:834)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:435)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:449)
at org.openqa.selenium.server.browserlaunchers.FirefoxCustomProfileLauncher.launch(FirefoxCustomProfileLauncher.
java:119)
... 13 more
queryString = cmd=testComplete
Got result: ERROR: No launcher found for sessionId null

i running windows xp, selenium-rc 0.7.1

any ideas?

Christian

Christian Kreutzer

unread,
Apr 5, 2006, 4:59:53 PM4/5/06
to selenium-users...@googlegroups.com
Hi Dan,

Thanx for your reply.

> However, one workaround for this is just to remove
> the following values
> from your registry:
>
> HKCU\Software\Microsoft\Windows\CurrentVersion\Interne
> t Settings\AutoConfigURL
> HKCU\Software\Policies\Microsoft\Windows\CurrentVersio
> n\Internet Settings\EnableAutoproxyResultCache

I tried that but now i get a new Exception:

cmd=getNewBrowserSession&1=*iexplore&2=http://www.google.com
05.04.2006 22:42:41 org.mortbay.http.HttpConnection exception
WARNUNG: GET /selenium-server/driver/?cmd=getNewBrowserSession&1=*iexplore&2=http://www.google.com HTTP/1.1
java.lang.RuntimeException: java.io.IOException: CreateProcess: iexplore -new http://www.google.com/selenium-server/Sele
neseRunner.html?sessionId=1144269760953 error=2
at org.openqa.selenium.server.browserlaunchers.InternetExplorerCustomProxyLauncher.launch(InternetExplorerCustom
ProxyLauncher.java:80)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.j
ava:198)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:133)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.j
ava: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: CreateProcess: iexplore -new http://www.google.com/selenium-server/SeleneseRunner.html?s
essionId=1144269760953 error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Unknown Source)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:834)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:435)
at org.openqa.selenium.server.browserlaunchers.AsyncExecute.asyncSpawn(AsyncExecute.java:50)
at org.openqa.selenium.server.browserlaunchers.InternetExplorerCustomProxyLauncher.launch(InternetExplorerCustom
ProxyLauncher.java:73)
... 13 more
java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:4444/selenium-server/driver/?cmd=
getNewBrowserSession&1=*iexplore&2=http://www.google.com
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URLConnection.getContent(Unknown Source)
at org.openqa.selenium.server.SeleniumServer$3.run(SeleniumServer.java:263)
at java.lang.Thread.run(Unknown Source)


> It looks like Firefox isn't in the standard directory

yep. that's right.

> 2) You can also just specify a different location for
> Firefox like this:
>
> cmd=getNewBrowserSession&1=*firefox
> c:\blah\firefox.exe&2=http://www.google.com
>
> (or modify _example.rb to say "*firefox
> c:\\ blah\\ firefox.exe" instead of
> just "*firefox").

that helped :)
now i can start exploring SRC :)

best regards,
Christian

Dan Fabulich

unread,
Apr 5, 2006, 6:29:25 PM4/5/06
to selenium-users...@googlegroups.com
Christian Kreutzer wrote:

> WARNUNG: GET /selenium-server/driver/?cmd=getNewBrowserSession&1=*iexplore&2=http://www.google.com HTTP/1.1
> java.lang.RuntimeException: Output didn't look right: ! REG.EXE VERSION 3.0
> [...]

Ian, this bug [SRC-11] should now be fixed in the new 0.7.1-SNAPSHOT.
Please give it a try and let me know how it goes

http://www.openqa.org/selenium-rc/download/selenium-remote-control-0.7.1-SNAPSHOT.zip

If others can confirm that things are working better, this -SNAPSHOT will
become the new 0.7.1 release.

> WARNUNG: GET /selenium-server/driver/?cmd=getNewBrowserSession&1=%2Afirefox&2=http%3A%2F%2Fwww.irian.at HTTP/1.1
> java.lang.RuntimeException: java.io.IOException: CreateProcess: firefox -profile C:\selenium-remote-control-0.7.1\server
> \customProfileDir1144189071890 chrome://killff/content/kill.html error=2

This issue [SRC-10] is a little better in the new 0.7.1-SNAPSHOT as well,
but only by improving the error message slightly... Firefox still needs to
appear in the standard location, or on the PATH, or in a directory you
specify.

Good luck!

-Dan

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




Christian Kreutzer

unread,
Apr 6, 2006, 2:06:00 PM4/6/06
to selenium-users...@googlegroups.com
> Ah, another error=2. Is your iexplore.exe in a
> non-standard location as
> well? If so, try the same workaround:
>
> cmd=getNewBrowserSession&1=*iexplore
> c:\blah\iexplore.exe&2=http://www.google.com

oh, i forgot to tell that i use a german windows xp. iexplore is in its standard location (c:\programme\Internet Explorer\) but this path differs in the localized windows versions from the english ones... could that be the problem?

Reply all
Reply to author
Forward
0 new messages