Downloading and Installing Selenium RC:
Start and Stop Selenium Server:
- Go to http://seleniumhq.org/download/.
- Under Selenium Server (formerly the Selenium RC Server) section you can see the selenium server latest version.
- Click on download, it will be redirected to selenium server download page.
- Selenium server is a JAR file. Download selenium-server-standalone-2.ob3.jar.
- Create a Folder selenium in “C” drive.
- Paste the selenium-server-standalone-2.ob3.jar file in that folder.
Start and Stop Selenium Server:
- We need to be able to start and stop the Selenium Server.
- We can do this at the command line:
- Start: (Command line)
- java -jar selenium-server-standalone-2.0b3.jar
- Stop: (Browser)
- http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
Getting Started with Selenium/ Selenium RC steps:
- Record your test case using Selenium IDE
- Play your test case using selenium IDE itself to make sure that your test case works.
- Export your recording test case - as html file.
- Create a test suite.
- Run your exported html test case using selenium rc
Steps:
- Record a program using IDE:
- Create a folder in any drive – Ex: C:\tests
Create folders:
- We need to create two folders.
- 1.To save our test suite and test case. (tests)
- 2.To save results (results)
- Using Selenium IDE record a test case and save it as .html in a tests folder.
- Make sure your test run correctly.
Create a Test suite:
- Create a test suite and save it in C:\tests folder
Run your scripts using selenium RC:
- We can run our tests in any browser by using selenium RC.
Syntax:
java -jar selenium-server-standalone-2.0b3.jar -htmlSuite "*browser" "http://www.example.com" "c:\naga\tests\run.html" "c:\naga\results\results1.html“
RUN THE ABOVE COMMAND FROM COMMAND PROMPT:
Run this command from selenium directory.
Example:
C:\selenium>java -jar selenium-server.jar -htmlSuite "*iexplore" "http://www.google.com" "c:\naga\tests\run.html“ "c:\naga\results\results1.html"
Selenium Test Runner:
Results:
Naga,
ReplyDeleteThanks for this useful blog.
I am trying to execute from command line a selenium test written in java rather than recorded with SeleniumIDE. Do you happen to know an example for that?.
Thank you,
Sebastian.
Hi Sebastian,
ReplyDeleteI have no idea about that. But i knew how to run Java script from IDE
Thanks,
Naga
Hi, Can you tell me how to stop the selenium server from Command prompt
ReplyDeleteregards,
shaleni
Hello thank you for this and i have managed to get the RC to run my scripts in IE after following these steps.
ReplyDeleteI am having problems with the results and I am getting time out error in results even though it seems to be working. Do you know why?
thanks
Even i'm getting time out error issue. Default time out for each command is 3000ms so is there any way to increase this time out ? Please help me in this way.
ReplyDeleteyou can use command settimeout() in your test case to change the default timeout.
DeleteThis is wonderful post.I never seen like this information in any website or document or materials.
ReplyDeleteThanks for brief and step wise description on RC.
Thanks !!!!- Milton
ReplyDeleteHi Naga,
ReplyDeleteCan you please comment how to run Java script from IDE
-vamsi
I mean how to run it from Command prompt as I am trying to execute as Junit script from command line prompt
ReplyDeletehi
ReplyDeletewhen i start the selenium server from command prompt it always display unable to access java-jar selenium server...can u help me to fix this problem
Prabhu.....
DeleteYou need to save selenium server in particular where you can access easily.
I saved it in C: to access in easy way.
Rename your server jar file name to Selenium-server or something else...
Now open Command prompt and type cd/ and enter
then C:
then use command like "java -jar selenium-server.jar
Now it will start selenium server :)
Hope it will be usefull :)
Hi Naga,
ReplyDeleteI want to know how the testSuite is created. Please let me know. coz i stuck in running the script,
Hi Naga ,
ReplyDeleteI tried to run this command on comamnd line to run test suite on google chrome
java -jar selenium-server-standalone-2.6.0.jar -htmlSuite "*googlechrome" "http://www.google.com" "C:\wamp\www\selenium\test\googleSuite.html" "C:\wamp\www\selenium\result\result_googlechrome19sep1.html"
that command is working fine on IE but its just opening in chrome but not testing the test cases.
Could you please help me in this?
Thanks,
Anand(anandshahil11@gmail.com)
When i running the iexplore.
ReplyDeletejava -jar selenium-server-standalone-2.7.0.jar -htmlSuite "*iexplore" "http://google.co.in" "c:\seleniumTesting\suit.html" "c:\seleniumTesting\report\report.html
i have a one pop up box is came it shown An errr has occured in the script on this page.
pop-up block enabled
Thanks
venu
i am getting the same message as mentioned by venu..please help
ReplyDeleteHi Venu,
ReplyDeleteThat is the problem with IE.u need to diable the security check..for more details pls go through the post..
http://testerinyou.blogspot.com/2011/03/error-while-running-selenium-scripts-on.html
Thanks,
Naga
for me it is giving an error that java is not recognized as an internal and external comamnd.
ReplyDeleteInstall java in you system as well as selenium server
DeletePlease help me what do i need to do when "java not found as an ext and int command" is received. I need to start the selenium server.
ReplyDeleteThanks dude for below information..........
ReplyDelete"http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer"
I have did everything what you have mentioned, but still i am not able to run my script.
ReplyDeleteIn IE and firefox - i am getting message that
And for iexploreproxy - 14:26:08.830 INFO - Killing Firefox...
14:26:08.832 WARN - Firefox seems to have ended on its own (did we kill the real
browser???)
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Timestamp: Tue, 7 Feb 2012 08:55:05 UTC
Message: Access is denied.
Line: 184
Char: 9
Code: 0
URI: http://www.google.com/selenium-server/core/scripts/selenium-testrunner.js
for iexploreproxy - Webpage error details
DeleteUser Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Timestamp: Tue, 7 Feb 2012 08:55:05 UTC
Message: Access is denied.
Line: 184
Char: 9
Code: 0
URI: http://www.google.com/selenium-server/core/scripts/selenium-testrunner.js
Hi Naga,
ReplyDeleteIts a wonderful post.
Please keep sharing such posts.
Thanks for this post. But I encountered a problem when run the command line with browser "*firefox". The testing stopped after the first case run and never run the rest test cases.
ReplyDeleteAnybody has such experience? Thanks ahead.
Nice posting, I subsribe your feed. Keep it up with fresh idea.
ReplyDelete@naga, i am not able to execute conditional statements like gotoif. It is giving me error as unknown command..
ReplyDeleteHi,
ReplyDeleteI have tried everything, and my command line is not giving me any error either. But it just opens a blank firefox page and its not running my testsuite!!
I am using following path :
java -jar selenium-server-standalone-1.0.3.jar -htmlSuite "*firefox" "http://www.google.co.uk" "c:\data\tsel\testsuite.html" "c:\data\sel\results.html“
Hi
ReplyDeleteI am getting error message while running the command in command prompt as
" Not enough command line arguments for -html suite
-html suites requires you to specify
* browserString ( e.g."*firefox")
* startURL (e.g. "http:/www.google.com")
* suiteFile (e.g. c:\absolute\path\to\my\HTMLSuite.html)
* resultFile (e.g."c:\absolue\path\to \my\results.html") "
Entered command as
java -jar selenium-server-standalone-2.25.0.jar -htmlSuite "*firefox""http://http://www.rediff.com" "c:\C:\Users\priya\Desktop\Seaonal_selenium\priyatest.html""c:\C:\Users\priya\Desktop\Seaonal_selenium\results.html"
in command promt
Please anyone help me regarding this.
mail id: rajpurn@gmail.com
Hi, can anyone tell me if there is a way of re-directing the display of the browser to another machine? basically I want the browser to run on a different environment from the RC server is installed.
ReplyDeletehey can some body help me
ReplyDeletehelp......
ReplyDeleteive only just started learning selenium#
ive been trying to start server from cmd with the following command java-jar selenium-server.jar. its comming with the error saying bindexception selenium server is running on port 4444
and also what is socket listener0.000.00444
how to run selenium script in google chrome by writing code in command prompt??
ReplyDeletethis is my first comments
ReplyDeleteHi Hello
ReplyDeletethis is my first comments
ReplyDeleteHi, how to setup selenium with eclipse
ReplyDeleteHi, how to setup selenium with eclipse
ReplyDeletehi
Deletefollow mentioned below steps for setup
1.Create a Java Project
A blank project explorer will be opened on closing welcome window.
The next step is to create a java project in eclipse. Choose File – New – Other.
Choose Java Project option in the new project wizard opened and click on Next.
Enter a name for project and check if Java Runtime Environment (JRE) is set for the project. If not, then choose any JRE available for use an execution environment JRE dropdown. Click on Finish button
A confirm dialog on setting association to Java perspective will be displayed. Check remember my decision checkbox and click on Yes button.
Once a new project is created, the project explorer will be displayed with new project created along with JRE chosen for it.
2.Configure Build Path
The next step is to configure build path to the newly created project. In this step, we will associate the selenium server JAR file to its respective project.
Right click on newly created java project – Choose Build Path – Choose Configure Build Path…
Click on Libraries tab in opened project properties dialog. Click on Add External JARs button and choose selenium server jar from its respective location.
serverjar
The final libraries tab will contain selenium server selected along with JRE set
for more refer link
http://diveintotesting.com/2013/02/19/selenium-web-driver-setup-using-eclipse-and-java/
Hi, how to setup selenium with eclipse
ReplyDeleteHi I got error as Time out 30000ms. so please tell me how can i solve it??
ReplyDeletedevising use of this method as a natural symptoms such as Itch or discharge.
ReplyDeletemany women familiar dispatch with candida but this isn't e'er the lado os colares coloridos ou grandes.
They are both all remedies for Yeast Infection is yoghourt, garlic, and many others
out In that location. You may considerably get a complete that likewise vernacular during pregnancy.
refer a Medical professional if you are for the Utmost 12 hours, this can be an indicant at possible IV liquid permutation.
my web-site photos of yeast infections
Oh my goodness! Incredible article dude! Many thanks, However I am having issues with your RSS.
ReplyDeleteI don't know why I cannot subscribe to it. Is there anybody getting identical RSS issues? Anybody who knows the solution will you kindly respond? Thanx!!
Here is my web site ... eschelongames.com
After exploring a few of the articles on your website, I
ReplyDeletereally like your way of writing a blog. I book marked it to my bookmark webpage list and will be checking back
in the near future. Take a look at my website too and let me know how you feel.
Here is my page workouts for vertical
Wow, that's what I was searching for, what a stuff! present here at this weblog, thanks admin of this website.
ReplyDeleteFeel free to surf to my webpage ... https://Students.Ee.Port.Ac.uk/ece50340/fridgebook/ChastitylvAlbrittonjm
It's actually a cool and helpful piece of info. I am happy that you just shared this helpful info with us. Please stay us up to date like this. Thanks for sharing.
ReplyDeletemy web blog: http://verticaljump.einfohound.com/vertical-jump-program-reviews/increase-your-vertical-jump-best-programs-rated
I would like to thank you for the efforts you have put in
ReplyDeletepenning this website. I am hoping to view the same
high-grade blog posts from you later on as well. In fact,
your creative writing abilities has inspired me to
get my own blog now ;)
My webpage: exercises to increase vertical jump
The Lego figure has an evil face, a detailed body with a cape and removable helmet as well as the inevitable red lightsaber.
ReplyDeleteWith all of the technological advances made by toy makers and manufacturers,
the word "toy" means something completely different than it
did to the past generations. But are you aware that Lego also produce electric toy trains
and that they not only have trains, but also locomotives, track, rolling stock, train stations, signal houses and a whole load of other track side buildings and they all have
the logo construction theme running through them.
Also visit my blog post; compendium.itcilo.org
without recording can we write script for selenium Rc if yes then what is syntax for that
ReplyDeletewithout recording can we write script for selenium Rc if yes then what is syntax for that
ReplyDeletehi, I am using selenium RC command . java -jar /home/selenium/selenium.jar -timeout 60000 -browserTimeout 60000 -htmlSuite '*firefox' http://localhost /opt/selenium/AutomationTS_4.html /var/TestResult.html -firefoxProfileTemplate "/root/.mozilla/firefox/fmdhqc12.selenium" But , i am getting timeout error(30000secs). please help me to get resolve this issue
ReplyDeleteVery useful blog .Simple language used and straight to the point. Keep up the good work
ReplyDeleteIt fun to have a content like this really worth to read it
ReplyDeletePlSQL Training
in command prompt not able to access the server .message is there "java not found as an ext and int command" is received
ReplyDeleteJordans 11
ReplyDeleteJordan 4
Pandora Jewelry
Air Jordan 4 Retro
Pandora Jewelry Official Site
Pandora Charms Outlet
Pandora Jewelry
Yeezy boost
Air Max 270
Ryan20180914