Tuesday, September 11, 2012

Introduction to Selenium

Selenium Overview

Selenium Commands

Selenium IDE :
This Tutorial is for the beginners; this Post explains the Basic feature of IDE and how you can create the script using IDE. In the Next part will explain the Selenium command and modifying script for the conditional statement, looping statement and parameterization of Data.

What is Selenium: Selenium is the open source tool. Selenium Tool suite has different components which can be used Developer/QA Test Engineer for automating there manual work. The Selenium web page says “Selenium automates browsers” Selenium test gets executed directly in the browser just the same way as a real user perform some action.

What is Selenium IDE: Selenium IDE (Integrated Development Environment) is selenium component of selenium tools suite. Selenium IDE is a firefox plug-in which is used for creating and executing the script.

Selenium IDE Layout Features:
Given below screen is of Selenium IDE:


To understand this lets divide the section of IDE in to four parts:


The interface features the following elements:
(1): Action bar: Action bar contains the following field.

  1. The base url of the application
  2. Test speed
  3. Run test-suite
  4. Run the selected test case only
  5. Pause the test
  6. Next step (while paused only)
  7. Open Selenium TestRunner
  8. Apply rollups 
  9. Start/Stop recording

(2): Test-suite: Shows the tests in the current test-suite along with the results.


(3): Test editor:  To understand the Test Editor will further divide it in to the 5 section as shown in the given below screen:
Where 5 sections are the following:
  1. Test Steps
  2. The command of the current step
  3. The locator argument
  4. Find’ button highlights the target of the locator on the page
  5. The value argument
(4): Tool panel:  Following screen shows the Tool panel.


  1. Log: When you run your test case, error messages and information messages showing the progress are displayed in this pane automatically
  2. Reference: Displays the documentation of the command actually selected
  3. UI-Element: Displays the ui-element mappings actually in use
  4. Rollup: Shows rollup rules
  5. Log level (only with log panel): Customize the verbosity of the log
  6. Clear log (only with log panel): Clears the log

How does Selenium IDE Works:
Selenium ide is a firefox plug-in which is used for creating/Editing script in firefox using either Recording methods or you can manually create Script. When you perform some action on a web page the selenium commands gets recorded and it appears in the table format in the Selenium test case Editor. Selenium IDE works the same way as any recording tools works but it has more featured then a recording tool.

How to Create Script in Selenium IDE:
You can create script in selenium IDE using recorder or else if you know the selenium commands then you can write the command manually.

Creating Script using Recorder:

  1. Open the firefox
  2. Select Selenium IDE under the Tools menu
You will see the following screen:
3. By default the recording button (It is the small red button in the top right corner in ide) is on but if it is not on then you need to click on it.
Once you will open the ide you will see the following screen:

4. Now type the url in the firefox (e.g) www.google.co.in
5. Now type Automation testing in the search box
6. Click on search
7. Open the Link
8. Click on record button to stop recording
9. Save the Script by clicking on the File menu->Save test Case

Once you have recorded the script you should get something like the following screen:



You can view the Script in the Test Case Editor pane in two formats, in the table format and in the source.
By default the source gets recorded in the html format.

Executing Script:
To execute the script you just need to click on the Play button on the action bar.

The Above Screen shows that one test has been executed successfully. 







30 comments:

  1. nice... Happy testing :)

    ReplyDelete
  2. Great knowledge sharing !!!

    ReplyDelete
    Replies
    1. Thanks Rinku, keep visiting for other interesting stuff.

      Delete
  3. Thanks for the valuable information!!!

    ReplyDelete
  4. Link exchange is nothing else but it is simply placing
    the other person's webpage link on your page at proper place and other person will also do similar in favor of you.


    My blog post BUy Xtreme Antler

    ReplyDelete
  5. Its not my first time to visit this web page, i am visiting
    this site dailly and take pleasant facts from here daily.


    Also visit my website; Versicherung

    ReplyDelete
  6. Hi to every body, it's my first pay a visit
    of this blog; this webpage consists of awesome and really
    good material for visitors.

    My web site :: Buy Safer Colon

    ReplyDelete
  7. You actually make it seem so easy with your presentation but I find this matter to be actually something that I think I would never understand.
    It seems too complicated and extremely broad for me.
    I am looking forward for your next post, I'll
    try to get the hang of it!

    my homepage :: cheap auctions

    ReplyDelete
  8. Hiii to all ,i m actually new to this blog,recently i started to learn this testing and i use to read the blog .its very intersting and useful to the freshers as well as experienced in testing.
    i completed course in java ,nw i m working as production support in polaris ,i planned to learn selenium tool i dont knw manual testing ,nw eagerly waiting to jump into pure testing ..i m in confussion any one give some idea to choose my carrier

    ReplyDelete
  9. Great read, Selenium has brought evolution to automation world.
    Thanks for taking a time to share a wonderful article.

    Best Selenium training in Chennai | Best Selenium training in Chennai

    ReplyDelete
  10. Selenium automation evolution was originally developed by Jason Huggins in 2004 as an internal tool at Thought Works. It's most want to be all selenium evolution details is really information.Thanks a lot.
    Selenium Training in Chennai
    Selenium Training Institute in Chennai

    ReplyDelete
  11. I really appreciate your writing style.I think your are well experience in writing a blog.Thanks for sharing.keep sharing more blogs.

    Selenium Training in Bangalore

    ReplyDelete
  12. To improve Knowledge about the latest and vital technology would increase one's self esteem to the core at the time of lagging confidence.The content presented here is quite resembling the same. You have done a great job by sharing this in here.
    sap abap crm training

    ReplyDelete
  13. Thanks For Sharing the Information The Information Shared Is very valuable Please Keep Updating us Time Just Went On Reading The article Python Online Training Hadoop Online Training Data Science Online Training AWS Online Training

    ReplyDelete
  14. Thanks for sharing such an informative blog. I have read your blog and I gathered some needful information from your post. Keep update your blog. Awaiting for your next update.

    Selenium Training in chennai | Selenium Training in annanagar | Selenium Training in omr | Selenium Training in porur | Selenium Training in tambaram | Selenium Training in velachery




    ReplyDelete
  15. I am Very Thankful for all your Works.Big Thumbs up!!!I have read your blog and I gathered some needful information from your post...
    Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery

    ReplyDelete