Selenium Beginner's Guide:
Selenium is an automated testing tool. Varius selenium testing tools used widely are,
Selenium is an automated testing tool. Varius selenium testing tools used widely are,
- Selenium IDE
- Selenium RC
- Webdrivers
- Selenium Core etc
Getting Started With Selenium IDE
Installing Selenium IDE Add-on to FireFox Browser
Selenium IDE plugin can work only with "FireFox" browser.
Selenium IDE plugin can be downloaded from http://seleniumhq.org/download/ this link (Use FireFox browser)
Restart your FireFox browser.
Click Tools --> Selenium IDE. Selenium IDE successfully added to the Firefox add-ons.
Recording Scripts With Selenium IDE
1. Enter the URL to be recorded in the Base URL field. (For Ex: www.google.com).
2. Click "Record" button.
3. Open www.google.com in your browser.
4. Enter some text in the query field (For ex: enter Anitha blog in google search engine)
5. All the actions will be recorded by the selenium IDE.
Example Selenium IDE scripts to open google and search the keyword "Anitha's Blog"
Step 1:
Using FireBug to identify Web Elements:
With your firefox browser open https://getfirebug.com/downloads/, Click download button on the top right corner. It will navigate you to .xpi file lists , click any one of the firebug xpi file.Restart your Firefox browser. Firebug add-on will be added to your "FireFox" browser.
Finding Web Elements:
- Open www.google.com
- Press "F12" button. Firebug watcher will be opened on the webpage.
- Identify the name of the google textbox using firebug.
Writing Selenium IDE scripts
Open
This command is used to open the given URL.
(Command: open Target: www.google.com )
WaitForElementPresent
This Command let the browser to wait until the specified web element is appear/present in the webpage.
(Command: WaitForElementPresent Target: id=gs_ttg)
Type
This Command will enter the given value into the specified target.
(Command: Type Target: id=gs_ttg Value:Anitha's Blog)
Click
This Command clicks the specified target location.
(Command: Click Target: id=gs_ttg)