Reputation: 11
Hello I'm having trouble running Selenium test created by Selenium IDE.
My main problem is that I don't know where to go.
I created a test in the Selenium IDE. I can make it work on Firefox from the IDE and save it in HTML, java, python, C#, Perl. That was the first ( easy ) part.
I would now like to execute the same test on another browser ( doesn't matter the language but I will focus on letting the test himself either in HTML or java).
That's where I don't know where to go. The IDE documentation talk about " using a simple command-line interface that invokes the Selenium-RC server. " but on other part of the website you can see that Selenium RC is officially deprecated.
Things seems to be replaced by Selenium 1.0 + Selenium WebDriver where Selenium WebDriver fits in the same role as RC did.
Then on the download page you have this line:
-To run Selenium tests exported from IDE, use the Selenium Html Runner.
with a link to a jar and no documentation at all.
So, today which one should I use :
Selenium-RC server , Selenium WebDriver or the Selenium Html Runner ?
and how do they work, do my test cases need to stay in HTML or move to java?
The final goal is to run those tests using Jenkins, which also contains plugin for Selenium that may help.
Thanks for your answers.
Upvotes: 1
Views: 1727
Reputation: 2461
To run Selenium HtmlSuite by using Selenium-Standalone Server (Selenium RC): http://www.seleniumhq.org/docs/05_selenium_rc.jsp#run-selenese-directly-within-the-server-using-htmlsuite
java -jar selenium-server.jar -htmlSuite "*firefox" "http://10.8.100.106" "C:\mytestsuite\mytestsuite.html" "C:\mytestsuite\results.html"
But I think WebDriver has retired/changed that format.
Upvotes: 1
Reputation: 633
Save this file some where in you machine
Download following jars:
Open eclipse
Create a java project , add a package (Check your exported java file copy the package name and create a package)
6. Copy the java file to the newly created package , change the class name's first letter as small case
Add required jar file as follow: Both testng jar & selenium satndalone jar
Now change the driver, whcih ever you want: I have changed the ff driver to chrome
If you get any error like this:
add this following: You need to provide the chrome.exe location(in my case its 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe')
System.setProperty("webdriver.chrome.driver", "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe");
Upvotes: 1