Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I want to run Selenium test case file from command line

Tags:

I made then saved a test case with the Firefox extension "Selenium IDE".

Now I want to use command line to run this exported html file.

I try to follow this how-do-i-launch-the-selenium-ide-from-the-command-line-with-a-specific-test-case but it doesn't work.

Please help me.

like image 940
phuwanart Avatar asked Aug 05 '09 08:08

phuwanart


People also ask

How do I run a Selenium file?

Prerequisites for Selenium InstallationJava (JDK) Eclipse. Selenium Client and WebDriver Language bindings. Configuring Selenium Webdriver with Eclipse.


1 Answers

You will need the Selenium RC which you can get from:
http://seleniumhq.org/download/

And Java 1.5 or higher (Download Java here)

1) Install Java
2) Unpack Selenium RC.
3) Open a cmd.exe window and go to the directory containing the Selenium Server (selenium-remote-control-1.0.1\selenium-server-1.0.1)
4) Run the command below:

java -jar selenium-server.jar -htmlSuite "*firefox" "http://10.8.100.106" "C:\mytestsuite\mytestsuite.html" "C:\mytestsuite\results.html" 

This should run your test suite in Firefox and write the results to the html file. Obviously you will need to change the "http://10.8.100.106" argument to your own server (this might just be localhost / 127.0.0.1)

like image 90
jmc Avatar answered Dec 04 '22 04:12

jmc