Creating and executing selenium script
Selenium IDE is an automated testing tool which can be used to create automated scripts to test the web application more faster. Below is how a selenium script can be created and executed.
1. Above snapshot is the basic layout of selenium IDE. In above snapshot, red colored round button is nothing but Recorder button. By keeping the recorder button as ON, we can record name of textboxes, radio button, text typed in textbox into screen below it. This is detailed in snapshots below. You can see the text box of Base URL, containing URL. You can give URL of your web application so that scripts will test on your application.
3. Above snapshot tells that IDE is recording actions taken on www.google.co.in. Note that in order to record actions, red colored circle button needs to be ON as shown in above snapshot. In above snapshot, as "google" is typed in the textbox of google.com website, 2 commands are automatically recorded i.e. open and type. open command opens the URL placed in Base URL and type command identifies what text is typed in which text box alongwith the name of that text box. Here, name of text box on google.com is "sf".
4. Similarly, button whose name is "Google Search" in display, has actual name as "btnG". As this button was clicked, click command was automatically traced by IDE. And now, save the script. Always remember to save the script with .html as extension. Here, script was saved as script.html.
5. Now for execution of the script, Make the recorder button as OFF. Click Execute button as shown in above snapshot. After execution, result looks some thing like shown below.
Like it on Facebook, +1 on Google, Tweet it or share this article on other bookmarking websites.