Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Not able to run Selenium IDE test cases in using Selenium RC

View previous topic View next topic Go down

Not able to run Selenium IDE test cases in using Selenium RC

Post by umashankar on Tue Dec 20, 2011 3:06 pm

Hi All,
I am new to selenium RC and am facing issue on running selenium IDE test cases, Below i have pasted the console, Please have a look at this and help me out,

CONSOLE 1:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\umashankar>cd..

C:\Documents and Settings>cd..

C:\>cd ls
The system cannot find the path specified.

C:\>cd selenium

C:\Selenium>cd Selenium RC

C:\Selenium\Selenium RC>java -jar selenium-server-standalone-2.12.0
Unable to access jarfile selenium-server-standalone-2.12.0

C:\Selenium\Selenium RC>cd..

C:\Selenium>cd..

C:\>C:\Selenium\Selenium RC\selenium-server-standalone-2.12.0
'C:\Selenium\Selenium' is not recognized as an internal or external command,
operable program or batch file.

C:\>cd..

C:\>cd Selenium

C:\Selenium>cd Selenium RC

C:\Selenium\Selenium RC>java -jar selenium-server-standalone-2.12.0
Unable to access jarfile selenium-server-standalone-2.12.0

C:\Selenium\Selenium RC>java -jar selenium-server-standalone-2.12.0.jar
Dec 20, 2011 1:06:52 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
13:06:52.422 INFO - Java: Sun Microsystems Inc. 20.2-b06
13:06:52.422 INFO - OS: Windows XP 5.1 x86
13:06:52.438 INFO - v2.12.0, with Core v2.12.0. Built from revision 14666
13:06:52.625 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
13:06:52.625 INFO - Version Jetty/5.1.x
13:06:52.641 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
13:06:52.641 INFO - Started HttpContext[/selenium-server,/selenium-server]
13:06:52.641 INFO - Started HttpContext[/,/]
13:06:53.110 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@111a3ac
13:06:53.110 INFO - Started HttpContext[/wd,/wd]
13:06:53.157 INFO - Started SocketListener on 0.0.0.0:4444
13:06:53.157 INFO - Started org.openqa.jetty.jetty.Server@be2358


CONSOLE 2:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\umashankar>cd..

C:\Documents and Settings>cd..

C:\>
C:\>
C:\>java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefoxhttp://192.168.0.149/SSB/Default.aspx "C:\Documents and Settings\umashankar\Desktop\SIDE Scripts for Accuware\TestSuiteforSSB.html" "C:\Documents and Settings\umashankar\Desktop\result.html"
Exception in thread "main" java.lang.NoClassDefFoundError: ûjar
Caused by: java.lang.ClassNotFoundException: ûjar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: ΓÇôjar. Program will exit.

C:\>java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefox http://192.168.0.149/SSB/Default.aspx "C:\Documents and Settings\umashankar\Desktop\SIDE Scripts for Accuware\TestSuiteforSSB.html" "C:\Documents and Settings\umashankar\Desktop\result.html"
Exception in thread "main" java.lang.NoClassDefFoundError: ûjar
Caused by: java.lang.ClassNotFoundException: ûjar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: ΓÇôjar. Program will exit.

C:\>
C:\>java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefox http://192.168.0.149/SSB/Default.aspx "C:\Documents and Settings\umashankar\Desktop\SIDE Scripts for Accuware\result.html"
Exception in thread "main" java.lang.NoClassDefFoundError: ûjar
Caused by: java.lang.ClassNotFoundException: ûjar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: ΓÇôjar. Program will exit.

Thanks,
umashankar

umashankar
Active particpant
Active particpant

Posts : 24
Join date : 2011-11-14

Back to top Go down

Re: Not able to run Selenium IDE test cases in using Selenium RC

Post by faramka on Tue Dec 20, 2011 4:20 pm

At first: log from console 1.
You can run the server simply by typing in command line (from anywhere on the disk):
java -jar C:\Selenium\Selenium RC>java -jar selenium-server-standalone-2.12.0

At second: log from console 2.
The main problem is in this line:
Code:
Could not find the main class: ΓÇôjar.  Program will exit.
Is there any class in your test cases file?

Maybe this http://darrellgrainger.blogspot.com/2010/02/creating-selenium-test-case-in-java.html will help you. There is information how should look test cases file.

faramka
Professional
Professional

Posts : 143
Join date : 2011-09-15
Location : Poland

Back to top Go down

Re: Not able to run Selenium IDE test cases in using Selenium RC

Post by umashankar on Tue Dec 20, 2011 5:49 pm

Hi Faramka,
Itried by this and got the output,

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\umashankar>cd..

C:\Documents and Settings>cd..

C:\>
C:\>
C:\>java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefoxhttp://192.168.0.149/SSB/Default.aspx "C:\Documents and Settings\umashankar\Desktop\SIDE Scripts for Accuware\TestSuiteforSSB.html" "C:\Documents and Settings\umashankar\Desktop\result.html"
Exception in thread "main" java.lang.NoClassDefFoundError: ûjar
Caused by: java.lang.ClassNotFoundException: ûjar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: ΓÇôjar. Program will exit.

C:\>java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefox http://192.168.0.149/SSB/Default.aspx "C:\Documents and Settings\umashankar\Desktop\SIDE Scripts for Accuware\TestSuiteforSSB.html" "C:\Documents and Settings\umashankar\Desktop\result.html"
Exception in thread "main" java.lang.NoClassDefFoundError: ûjar
Caused by: java.lang.ClassNotFoundException: ûjar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: ΓÇôjar. Program will exit.

C:\>
C:\>java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefox http://192.168.0.149/SSB/Default.aspx "C:\Documents and Settings\umashankar\Desktop\SIDE Scripts for Accuware\result.html"
Exception in thread "main" java.lang.NoClassDefFoundError: ûjar
Caused by: java.lang.ClassNotFoundException: ûjar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: ΓÇôjar. Program will exit.

C:\> java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefox http://book.theautomatedtester.co.uk "C:\Selenium\testtest\testsuite1.html" "C:\Selenium\testtest\result.html"
Unable to access jarfile selenium-server-standalone-2.12.0.jar

C:\> java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefox http://book.theautomatedtester.co.uk "C:\Selenium\testtest\testsuite1.html" "C:\Selenium\testtest\result.html"
Unable to access jarfile selenium-server-standalone-2.12.0.jar

C:\>java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefox http://book.theautomatedtester.co.uk "C:\Selenium\testtest\testsuite1.html" "C:\Selenium\testtest\result.html"
Unable to access jarfile selenium-server-standalone-2.12.0.jar

C:\>cd selenium

C:\Selenium>cd selenium RC

C:\Selenium\Selenium RC>java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefox http://book.theautomatedtester.co.uk "C:\Selenium\testtest\testsuite1.html" "C:\Selenium\testtest\result.html"
Dec 20, 2011 3:55:13 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
15:55:13.966 INFO - Java: Sun Microsystems Inc. 20.2-b06
15:55:13.966 INFO - OS: Windows XP 5.1 x86
15:55:13.982 INFO - v2.12.0, with Core v2.12.0. Built from revision 14666
15:55:14.170 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
15:55:14.170 INFO - Version Jetty/5.1.x
15:55:14.185 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
15:55:14.185 INFO - Started HttpContext[/selenium-server,/selenium-server]
15:55:14.185 INFO - Started HttpContext[/,/]
15:55:14.295 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@111a3ac
15:55:14.295 INFO - Started HttpContext[/wd,/wd]
15:55:14.295 WARN - Failed to start: SocketListener0@0.0.0.0:4444
Exception in thread "main" java.net.BindException: Selenium is already running on port 4444. Or some other service is.
at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:464)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:282)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:245)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:54)

C:\Selenium\Selenium RC>java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefox http://book.theautomatedtester.co.uk "C:\Selenium\testtest\testsuite1.html" "C:\Selenium\testtest\result.html"
Dec 20, 2011 3:56:11 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
15:56:12.030 INFO - Java: Sun Microsystems Inc. 20.2-b06
15:56:12.030 INFO - OS: Windows XP 5.1 x86
15:56:12.046 INFO - v2.12.0, with Core v2.12.0. Built from revision 14666
15:56:12.249 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
15:56:12.249 INFO - Version Jetty/5.1.x
15:56:12.249 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
15:56:12.249 INFO - Started HttpContext[/selenium-server,/selenium-server]
15:56:12.249 INFO - Started HttpContext[/,/]
15:56:12.359 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@110b053
15:56:12.359 INFO - Started HttpContext[/wd,/wd]
15:56:12.374 INFO - Started SocketListener on 0.0.0.0:4444
15:56:12.374 INFO - Started org.openqa.jetty.jetty.Server@54172f
Can't find HTML Suite file:C:\Selenium\testtest\testsuite1.html:
Usage: java -jar selenium-server.jar [-interactive] [options]

-port : the port number the selenium server should use
(default 4444)
-timeout : an integer number of seconds before we should give
up
-interactive: puts you into interactive mode. See the tutorial for
more details
-singleWindow: puts you into a mode where the test web site
executes in a frame. This mode should only be selected if the
application under test does not use frames.
-profilesLocation: Specifies the directory that holds the profiles
that java clients can use to start up selenium. Currently
supported for Firefox only.
-forcedBrowserMode : sets the browser mode to a single
argument (e.g. "*iexplore") for all sessions, no matter what is
passed to getNewBrowserSession
-forcedBrowserModeRestOfLine : sets the browser mode to
all the remaining tokens on the line (e.g. "*custom
/some/random/place/iexplore.exe") for all sessions, no matter what
is passed to getNewBrowserSession
-userExtensions : indicates a JavaScript file that will be
loaded into selenium
-browserSessionReuse: stops re-initialization and spawning of the
browser between tests
-avoidProxy: By default, we proxy every browser request; set this
flag to make the browser use our proxy only for URLs containing
'/selenium-server'
-firefoxProfileTemplate : normally, we generate a fresh empty
Firefox profile every time we launch. You can specify a directory
to make us copy your profile directory instead.
-debug: puts you into debug mode, with more trace information and
diagnostics on the console
-browserSideLog: enables logging on the browser side; logging
messages will be transmitted to the server. This can affect
performance.
-ensureCleanSession: If the browser does not have user profiles,
make sure every new session has no artifacts from previous
sessions. For example, enabling this option will cause all user
cookies to be archived before launching IE, and restored after IE
is closed.
-trustAllSSLCertificates: Forces the Selenium proxy to trust all
SSL certificates. This doesn't work in browsers that don't use the
Selenium proxy.
-log : writes lots of debug information out to a log
file
-htmlSuite : Run a
single HTML Selenese (Selenium Core) suite and then exit
immediately, using the specified browser (e.g. "*firefox") on the
specified URL (e.g. "http://www.google.com"). You need to specify
the absolute path to the HTML test suite as well as the path to the
HTML results file we'll generate.
-proxyInjectionMode: puts you into proxy injection mode, a mode
where the selenium server acts as a proxy server for all content
going to the test application. Under this mode, multiple domains
can be visited, and the following additional flags are supported:

-dontInjectRegex : an optional regular expression that
proxy injection mode can use to know when to bypss injection
-userJsInjection : specifies a JavaScript file which will
then be injected into all pages
-userContentTransformation : a regular
expression which is matched against all test HTML content; the
second is a string which will replace matches. These flags can
be used any number of times. A simple example of how this could
be useful: if you add "-userContentTransformation https http"
then all "https" strings in the HTML of the test application will
be changed to be "http".
15:56:12.593 INFO - Shutting down...

C:\Selenium\Selenium RC>java -jar selenium-server-standalone-2.12.0.jar -htmlsuite *firefox http://book.theautomatedtester.co.uk "C:\Selenium\testtest\testsuite1" "C:\Selenium\testtest\result.html"
Dec 20, 2011 3:56:53 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
15:56:53.828 INFO - Java: Sun Microsystems Inc. 20.2-b06
15:56:53.828 INFO - OS: Windows XP 5.1 x86
15:56:53.844 INFO - v2.12.0, with Core v2.12.0. Built from revision 14666
15:56:54.047 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
15:56:54.047 INFO - Version Jetty/5.1.x
15:56:54.047 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
15:56:54.047 INFO - Started HttpContext[/selenium-server,/selenium-server]
15:56:54.047 INFO - Started HttpContext[/,/]
15:56:54.156 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@111a3ac
15:56:54.156 INFO - Started HttpContext[/wd,/wd]
15:56:54.172 INFO - Started SocketListener on 0.0.0.0:4444
15:56:54.172 INFO - Started org.openqa.jetty.jetty.Server@be2358
15:56:54.375 INFO - Preparing Firefox profile...
15:56:58.110 INFO - Launching Firefox...
15:57:00.438 INFO - Checking Resource aliases


Thanks

umashankar
Active particpant
Active particpant

Posts : 24
Join date : 2011-11-14

Back to top Go down

Re: Not able to run Selenium IDE test cases in using Selenium RC

Post by faramka on Thu Dec 22, 2011 3:25 pm

Hi umashankar,

Yesterday I was facing this issue, so probably I can help you now Smile

First of all: did you save a test suite in Selenium IDE (File -> Save Test Suite)? You have to generate test suite - it will contain information about test cases (which, of course, should also be saved (File -> Save Test Case)).

Are you sure the paths are alright?
And try put name of browser and URL in the quotation marks.

Code:
C:\Selenium\Selenium RC>java -jar selenium-server-standalone-2.12.0.jar -htmlsuite "*firefox" "http://book.theautomatedtester.co.uk" "C:\Selenium\testtest\testsuite1" "C:\Selenium\testtest\result.html"

faramka
Professional
Professional

Posts : 143
Join date : 2011-09-15
Location : Poland

Back to top Go down

Re: Not able to run Selenium IDE test cases in using Selenium RC

Post by umashankar on Thu Dec 22, 2011 4:51 pm

Hi Faramka,

I was did everything as you mentioned but no luck again am facing the same issue, Where else i amay went wrong faramka?

umashankar
Active particpant
Active particpant

Posts : 24
Join date : 2011-11-14

Back to top Go down

Re: Not able to run Selenium IDE test cases in using Selenium RC

Post by faramka on Fri Dec 23, 2011 3:08 pm

The problem was solved, so I'll write how to deal with this.

Issue:
Info from log: "Checking Resource aliases"
Solution:
Please edit test suit file and check is there something like this:
< ?xml version="1.0" encoding="UTF-8"? >
If there is - remove it.

faramka
Professional
Professional

Posts : 143
Join date : 2011-09-15
Location : Poland

Back to top Go down

Re: Not able to run Selenium IDE test cases in using Selenium RC

Post by umashankar on Fri Dec 23, 2011 4:07 pm

Yes faramka, now its working fine.. Thanks a lot for your great support..

Many Thanks..

umashankar
Active particpant
Active particpant

Posts : 24
Join date : 2011-11-14

Back to top Go down

Re: Not able to run Selenium IDE test cases in using Selenium RC

Post by Sponsored content Today at 7:13 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum