[selenium-users] Selenium RC :

4 views
Skip to first unread message

Shilpa

unread,
May 11, 2010, 6:09:38 AM5/11/10
to Selenium Users
Hello members,

I am a starter to use selenium automation tool. I am trying to run
Selenium-RC (using JAVA).

I downloaded selenium-RC and started the sever as java -jar selenium-
server.jar.

It started successfully.

Within eclipse when I try to run the selenium junit test case its
throwing exception as :

com.thoughtworks.selenium.SeleniumException: ERROR Server Exception:
sessionId should not be null; has this session been started yet?
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
97)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
91)
at
com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:
353)
at com.testscripts.TestMSMLogin.testMSMLogin(TestMSMLogin.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:616)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
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:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:
130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
196)

I updated my local system path as /usr/lib/firefox-3.0.4.

Still I am getting the same error. Any body faced this and any work
around?

Thanks in Advance,
Shilpa

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

Shilpa

unread,
May 11, 2010, 6:11:30 AM5/11/10
to Selenium Users

sandeep kota

unread,
May 18, 2010, 12:52:28 AM5/18/10
to seleniu...@googlegroups.com
Hi Shilpa,

May be this will help...





Cheers,
Sandeep
--
sandeep kota

Prasad Joshi

unread,
May 18, 2010, 2:44:30 AM5/18/10
to seleniu...@googlegroups.com
Can you please send your code?
 
--Prasad

amitkumar

unread,
May 18, 2010, 8:09:05 AM5/18/10
to Selenium Users
Have you added the junit jar in your eclipse project and selenium
server must be up before running the selenium RC testcase .

Thanks,
-Amit

sravan kumar

unread,
May 18, 2010, 8:19:33 AM5/18/10
to seleniu...@googlegroups.com
Hi, I also faced the same problem once.

My situation is 

I have one test case to create a contact in which i am calling a method for login. after logging in successfull, I tried to access the same sel object in createcontact test case, but the login method is returning a null value.

what i suggest is,
check whether u r calling any methods in that testcase?
if u r calling then check whether it is returning the sel object or null?

Thanks & Regards
--------------------------
Sravan Kumar J.

avinash nair

unread,
May 18, 2010, 8:22:24 AM5/18/10
to seleniu...@googlegroups.com
Hi All,

Not sure if this helps but you can give it a try

here what is did to get rid of this

=>first ensure that the browser is in the PATH before running the server. For example, you want to run the test in Firefox. Then you should do next two steps.

=>Locate firefox-bin (for example it returns /usr/lib/firefox-1.5.0.12/firefox-bin)

=>export PATH=$PATH:/usr/lib/firefox-1.5.0.12/firefox-bin;

Note: There is an alternative way to fix above error (browser is not in path). Simply replace chrome with browser PATH in SeleniumSTSanityTest.java file. For example:
line

setUp("www.google.com", "*chrome");
becomes
setUp("www.google.com", "*firefox /usr/lib/firefox-1.5.0.12/firefox-bin"); in SeleniumSTSanityTest.java.
To run the test in opera browser replace chrome with opera

Thanks,
Avinash Nair

On Tue, May 18, 2010 at 5:39 PM, amitkumar <amit2...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages