java-rc Can't run selenium tests under Windows 7

38 views
Skip to first unread message

bmolof

unread,
Jan 23, 2010, 9:16:27 AM1/23/10
to Selenium Users
I had my selenium tests running perfectly in windows xp, but they
stopped working when I moved everything over to my new box running
Windows 7. My environment is Maven2, JBoss, Selenium 1.0.1. I am
logged in as the primary administrator account.

I can see that the Selenium server is starting fine but all selenium
tests are failing with the same exception. Below is the exception
that I get in my logs. Any ideas?

java.lang.RuntimeException: Could not start Selenium session:
at com.thoughtworks.selenium.DefaultSelenium.start
(DefaultSelenium.java:89)
at com.mrm.test.web.SeleneseTestSupport.setUp
(SeleneseTestSupport.java:36)
at junit.framework.TestCase.runBare(TestCase.java:128)
at com.thoughtworks.selenium.SeleneseTestCase.runBare
(SeleneseTestCase.java:212)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.apache.maven.surefire.junit.JUnitTestSet.execute
(JUnitTestSet.java:213)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet
(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute
(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:1009)
Caused by: com.thoughtworks.selenium.SeleniumException:
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError
(HttpCommandProcessor.java:97)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand
(HttpCommandProcessor.java:91)
at com.thoughtworks.selenium.HttpCommandProcessor.getString
(HttpCommandProcessor.java:262)
at com.thoughtworks.selenium.HttpCommandProcessor.start
(HttpCommandProcessor.java:223)
at com.thoughtworks.selenium.DefaultSelenium.start
(DefaultSelenium.java:81)
... 25 more

Arya

unread,
Jan 23, 2010, 7:45:47 PM1/23/10
to Selenium Users
Are you using Firefox 3.6? if yes install Firefox 3.5

bmolof

unread,
Jan 24, 2010, 10:32:43 AM1/24/10
to Selenium Users
RIght now I am using IE8 with "*iexplore" as the browser start
command. I just ran with "*firefox" and I get the same problem.

I debugged my unit tests and the request to create the session returns
with a code of 200 but the response is empty.

> > com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExcepti­onOrError


> > (HttpCommandProcessor.java:97)
> >         at com.thoughtworks.selenium.HttpCommandProcessor.doCommand
> > (HttpCommandProcessor.java:91)
> >         at com.thoughtworks.selenium.HttpCommandProcessor.getString
> > (HttpCommandProcessor.java:262)
> >         at com.thoughtworks.selenium.HttpCommandProcessor.start
> > (HttpCommandProcessor.java:223)
> >         at com.thoughtworks.selenium.DefaultSelenium.start
> > (DefaultSelenium.java:81)

> >         ... 25 more- Hide quoted text -
>
> - Show quoted text -

Sascha

unread,
Jan 24, 2010, 4:48:43 PM1/24/10
to Selenium Users
You may start selenium server with -log selenium.log parameter and
have a look at the generated log file. Maybe that helps for problem
determination.

Sascha

bmolof

unread,
Jan 24, 2010, 11:00:34 PM1/24/10
to Selenium Users
I ran it with logging and I don't see any errors. THe only logging I
saw was when the server started. When I ran my tests, no logging was
done. The server and client are using default port 4444 so I don't
think it's a connection problem.

> > com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExcepti­onOrError


> > (HttpCommandProcessor.java:97)
> >         at com.thoughtworks.selenium.HttpCommandProcessor.doCommand
> > (HttpCommandProcessor.java:91)
> >         at com.thoughtworks.selenium.HttpCommandProcessor.getString
> > (HttpCommandProcessor.java:262)
> >         at com.thoughtworks.selenium.HttpCommandProcessor.start
> > (HttpCommandProcessor.java:223)
> >         at com.thoughtworks.selenium.DefaultSelenium.start
> > (DefaultSelenium.java:81)

bmolof

unread,
Jan 24, 2010, 11:35:51 PM1/24/10
to Selenium Users
Just out of curiosity, I changed the port to 1234 and it worked. It
looks like windows7 has some security that is blocking non well known
ports. I tried to open port 4444 in windows but that didn't seem to
work. I will just use port 1234 for now. Thanks.

> > - Show quoted text -- Hide quoted text -

darrell

unread,
Jan 25, 2010, 9:39:59 AM1/25/10
to Selenium Users
This is good to know. Thank you. I don't have Windows 7 installed yet
but I would guess, if you go to the Control Panel you'll find a
Windows Firewall application. Run that and there should be an
Exceptions tab. On that area you can add the port 4444. Additionally,
there should be an option in the firewall settings to display a
notification when the firewall blocks a program. I'd turn this on.
That way if it blocks something you'll know about it and can add an
exception from the warning dialog.

bmolof

unread,
Jan 25, 2010, 10:29:32 AM1/25/10
to Selenium Users
Thanks. I already tried that and it didn't work. Maybe I missed
something. I'll try again later today.

Vilius

unread,
Feb 4, 2010, 4:29:26 AM2/4/10
to Selenium Users
Hello guys!
I have a problem with selenium and windows 7 (32 bit). When I try to
start selenium server - it works without a problem, but when I start a
test, I get an error message:
Testing_Selenium_Exception: result is neither "true" or "false": OR
Server Exception: sessionId led to start new browser session: Unable
to delete file C:\Users\***\AppData\Local\Temp
\customProfileDir49a3d62142a74240933af219c8b31c2b\parent.lock doesn't
exist; perhaps this session was already stopped?
The server shows some strange failures either:
10:06:01.270 INFO - Got result: ERROR Server Exception: sessionId led
to start new browser session: Unable to delete file C:\Users\***
\AppData\Local\Temp\customProfileDir49a3d62142a74240933af219c8b31c2b
\parent.lock doesn't exist; perhaps this session was already stopped?
on session led to start new browser session:
Unable to delete file C:\Users\Vilius\AppData\Local\Temp
\customProfileDir49a3d62142a74240933af219c8b31c2b\parent.lock
10:06:01.286 INFO - Command request: isTextPresent[Guten Tag, ] on
session led to start new browser session: Unable to delete file C:
\Users\***\AppData\Local\Temp
\customProfileDir49a3d62142a74240933af219c8b31c2b
\parent.lock10:06:01.286 ERROR - Exception running 'isTextPresent
'command on session led to start new browser session: Unable to delete
file C:\Users\Vilius\AppData\Local\Temp
\customProfileDir49a3d62142a74240933af219c8b31c2b\parent.lock
java.lang.RuntimeException: sessionId led to start new browser
session: Unable to delete file C:\Users\Vilius\AppData\Local\Temp
\customProfileDir49a3d62142a74240933af219c8b31c2b\parent.lock doesn't
exist; perhaps this session was already stopped?
at
org.openqa.selenium.server.FrameGroupCommandQueueSet.getQueueSet(Fram
eGroupCommandQueueSet.java:218)
at
org.openqa.selenium.server.commands.SeleniumCoreCommand.execute(Selen
iumCoreCommand.java:34)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(Se
leniumDriverResourceHandler.java:549)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handleComman
dRequest(SeleniumDriverResourceHandler.java:364)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(Selen
iumDriverResourceHandler.java:125)
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:
820)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:
837)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)

C:\xampp\php\PEAR\Testing\Selenium.php:2621
C:\xampp\php\PEAR\Testing\Selenium.php:1712

I also tryed to run the server as an administrator and I also changed
the port. I just can't understand why it isn't running :( Thanks in
advice!


On 25 Jan., 16:29, bmolof <bmo...@gmail.com> wrote:
> Thanks.  I already tried that and it didn't work.  Maybe I missed
> something.  I'll try again later today.
>
> On Jan 25, 9:39 am, darrell <darrell.grain...@gmail.com> wrote:
>

> > This is good to know. Thank you. I don't haveWindows7installed yet


> > but I would guess, if you go to the Control Panel you'll find a

> >WindowsFirewall application. Run that and there should be an


> > Exceptions tab. On that area you can add the port 4444. Additionally,
> > there should be an option in the firewall settings to display a
> > notification when the firewall blocks a program. I'd turn this on.
> > That way if it blocks something you'll know about it and can add an
> > exception from the warning dialog.
>
> > On Jan 24, 11:35 pm, bmolof <bmo...@gmail.com> wrote:
>
> > > Just out of curiosity, I changed the port to 1234 and it worked.  It
> > > looks like windows7 has some security that is blocking non well known

> > > ports.  I tried to open port 4444 inwindowsbut that didn't seem to


> > > work.  I will just use port 1234 for now.  Thanks.
>
> > > On Jan 24, 11:00 pm, bmolof <bmo...@gmail.com> wrote:
>
> > > > I ran it with logging and I don't see any errors.  THe only logging I
> > > > saw was when the server started.  When I ran my tests, no logging was
> > > > done.  The server and client are using default port 4444 so I don't
> > > > think it's a connection problem.
>
> > > > On Jan 24, 4:48 pm, Sascha <saschaschwa...@yahoo.de> wrote:
>
> > > > > You may start selenium server with -log selenium.log parameter and
> > > > > have a look at the generated log file. Maybe that helps for problem
> > > > > determination.
>
> > > > > Sascha
>
> > > > > On 23 Jan., 15:16, bmolof <bmo...@gmail.com> wrote:
>

> > > > > > I had my selenium tests running perfectly inwindowsxp, but they


> > > > > > stopped working when I moved everything over to my new box running

> > > > > >Windows7.  My environment is Maven2, JBoss, Selenium 1.0.1.  I am

Vilius

unread,
Feb 10, 2010, 5:28:24 AM2/10/10
to Selenium Users
Isn't anybody able to help me?? :(

On 4 Feb., 10:29, Vilius <rugai...@web.de> wrote:
> Hello guys!

> I have a problem with selenium andwindows7(32 bit). When I try to

Southward Bitsoup

unread,
Feb 11, 2010, 5:58:59 AM2/11/10
to Selenium Users
I had the same problem after I upgraded to Firefox 3.6. Try your test
with Firefox 3.5

On Feb 10, 4:28 am, Vilius <rugai...@web.de> wrote:
> Isn't anybody able to help me?? :(
>

Reply all
Reply to author
Forward
0 new messages