User:Olegorel/Selenium

= My knowledge of Java includes =
 * The variables of simple types, classes and its instances (objects)
 * Loop cycles, switch, object instantiation, and method calling
 * Developing class with inheritance: class, subclass. (You don't know yet what is "interface")
 * Knowledge of class hierarchy: class, subclass & superclass. Usage of super keyword.
 * Constructors
 * Variables, objects and methods visibility
 * Accessors and mutators
 * Class packages

= How to create test suite in Selenium IDE =


 * Start Firefox
 * Go to Tools -> Selenium IDE
 * Click one the red round button in the upper left corner of the selenium window
 * Record the session in the main windows (not the selenium one)
 * Once recorded, click on the red round button second time
 * Save test by clicking to File -> Save Test As, name it test1
 * Save test suite by clicking to File -> Save Test Suite As, name it suite1 (write down full path, i.e. directory + suite1, for example c:\users\olena\suite1)

= How to run create test suite under selenium-rc = java -jar selenium-server-standalone-2.0b3.jar -htmlSuite *firefox http://www.google.com c:\users\olena\suite1 result.html java -jar selenium-server-standalone-2.0b3.jar -htmlSuite *abcde http://www.google.com c:\users\olena\suite1 result.html *firefox *mock *firefoxproxy *pifirefox *chrome *iexploreproxy *iexplore *firefox3 *safariproxy *googlechrome *konqueror *firefox2 *safari *piiexplore *firefoxchrome *opera *iehta *custom
 * Open windows command line (cmd)
 * Go to directory there selenium-server-standalone-2.0b3.jar
 * To get a help run "java -jar selenium-server-standalone-2.0b3.jar -help"
 * To run a test under firefox brower run:
 * To get list of browsers supported by selenium-rc let's just replace name of the browser by arbitrary strings
 * The list would be printed:

= The workflow to create test using Selenium-IDE, export it as Java, make manual modifications =


 * Start selenium IDE add-on in firefox and record the session to tests a website
 * Export created test case as TestNG test case
 * Start Eclipse and create Java project, the exported test case from selenium IDE is an original source code for the test.
 * TestNG and Selenium IDE libraries (jars) is added to the probject to compile.
 * The test case exported from Selenium IDE may be manually modified as needed.
 * Start selenium RC server
 * Start test from Eclipse

= The writing selenium tests from scratch on Java using Selenium Java Driver API =


 * Start Eclipse, create Java project
 * Import the selenium classes (com.throughtworks.selenium.*)
 * Create a "Selenium" object
 * Call needed sequence of API calls on this object, named similar to commands of selenium IDE (open, click, WaitPageToLoad, ....)
 * Compile, fix, and run (in the separate window the selenium RC server shall be started beforehand)