Selenium RC allows for flexibility with browsers used, among many other things. Setting up Selenium RC though is more complicated than getting started with IDE, so I thought I'd commit my findings to the Internet - as other posts I had found during my setup process on the subject were inconsistent.
Prerequisites:
1. PC running Windows (I love Mac's but I'm using a PC for this)
2. Firefox with the Selenium IDE plug-in installed (see Selenium Downloads)
3. Selenium Server downloaded with a correct java version running on your machine. (Java download if needed; & more info if you have trouble)
Step-by-step instructions on setting up Selenium RC:
- Create a working directory on your hard drive (ie: C:\Selenium). Tip: Keep it close to the root so you don't have to type long paths in the future.
- Copy the Selenium server file to the working directory. Tip: You may want to consider giving this file a shorter name so you don't have to type so much in the future (ie: "selenium-server.jar").
- Write 2 different sample tests using Selenium IDE (just to get this set up) and save them to the working directory.
- Change the extensions of the sample IDE files to .html
- Create an html file called "TestSuite.html" and save it to the working directory. This file should contain a directory of tests in the suite, as illustrated in the image below. Just rename the variables to suit your needs or add more rows as needed.
- Create a blank html file called "Results.html" and save it to the working directory. (Selenium RC needs a file, blank or not, with this name to operate)
- Open a command prompt in Admin Mode (Start > "cmd" > CTRL+SHIFT+ENTER)
- Navigate to the working directory in the command prompt.
- Type this command to start: java -jar selenium-server.jar -htmlSuite *iehta "http://www.yourwebsite.com" "C:\Selenium\TestSuite.html" "C:\Selenium\Results.html"
i am doing the same thing, but it has error running that test ... i am using Window 7, any suggestion?
ReplyDeletetommy
Happy to try to help, what is the error and at what step so you get it? Should work fine on Windows 7.
ReplyDelete