Friday, May 20, 2011

Running a test suite using Selenium

Sample Bat File to run the Selenium server Manually. Please be advised that while running the selenium server manually, we need to remove the scripts we

use in the class file to run the selenium server automatically.




D:

cd selenium

cd selenium RC

cd selenium-server-1.0.3

java -jar selenium-server.jar


The below script would be used in Selenium while running a suite using a .xml file. Please note that the xml file needs to be copied to the same package file.









Please note that the xml file needs to be copied to the same package file.The below script will be copied to each classes mentioned in the xml file.


selenium = new DefaultSelenium("localhost", 4444,"Browser","url");

selenium.start();

selenium.windowMaximize();

selenium.windowFocus();




Procedure to follow:


1) Right Click on Eclipse

2) Run As > Run Configuration

3) Browse the xml suite

4) Apply > Run 


______________________________________________________________

Reference: http://myselenium.wordpress.com

No comments:

Post a Comment