Mock tests, Interview questions, Tutorials and Tech news
 
 
Home > Programming / tutorials > Selenium – Web application testing tool

Selenium – Web application testing tool

What is Selenium ?

Selenium is an open source, robust set of tools that supports rapid development of test automation for web-based applications. This tool is primarily developed in Java Script and browser technologies and hence supports all the major browsers on all the platforms. Most of the time, we will not need to change our scripts for them to work on other platforms. Selenium provides a record/playback tool for authoring tests without learning a test scripting language.

Selenium Components

There are three variants of Selenium, which can be used in isolation or in combination to create complete automation suite for the web applications. Each one has a specific role in aiding the development of web application test automation.

  • Selenium IDE
  • Selenium Core
  • Selenium RC

Selenium IDE

Selenium IDE is an integrated development environment for Selenium tests. It is implemented as a Firefox extension, and has a recording feature, which will keep account of user actions as they are performed and store them as a reusable script to play back. Selenium-IDE also offers full editing of test cases for more precision and control.

How to Use Selenium:

Select “Selenium IDE” from the Tools menu in Firefox. By default when the IDE comes up it has recording turned on. Go to a web site that you want to record, click on the record button and begin the browsing task(s).  we will notice that as we click and type in the browser the IDE is recording everything we are doing.  When we are done, simply end recording and click on the green arrow to play back the script you just created.  Don’t forget to save your script before closing the IDE.Below are the screen shots of working of Selenium IDE and the script generated by IDE.

Please find in below link the Video presentation to record and execute a test

http://wiki.openqa.org/download/attachments/400/Selenium+IDE.swf?

Selenium

Selenium

Biggest drawback of Selenium IDE is its limitation in terms of browser support. Though Selenium scripts can be used for most of the browser and operating system,

Advantages of Selenium:

  • It is a Open source
  • Simple, Easy to install, Easy to work
  • Selenium IDE is the only flavor of Selenium which allows you to record user action on browser window
  • Can also record user actions in most of the popular languages like Java, C#, Perl, Ruby
  • It will not record any operation that you do on your computer apart from the events on Firefox browser window
  • During recording if you right click on any element it will show all the selenium commands available
  • we can also edit existing command, by selecting it and editing on the boxes available
  • we can also insert/delete commands by choosing appropriate option after right clicking
  • Choose appropriate run option – i.e walk, run or test runner and review your results

Disadvantages of Selenium:

  • Limitation in terms of browser support (It runs only in Mozilla).Scripts written using Selenium IDE can be used for other  browsers only if it is used with Selenium RC or Selenium Core.
  • We can’t run recorded script if it is converted to Java, C#, Ruby etc.
  • Not allowed to write manual scripts like conditions and Loops for Data Driven Testing
  • There is no option to verify images.

Selenium Core

Selenium Core is a test tool for web applications. Selenium Core tests run directly in a browser, just as real users do. They run in Internet Explorer, Mozilla and Firefox on Windows, Linux and Macintosh. It is a simpler form of Selenium, and suitable for non-developers.

Browser compatibility testing: To test the application if it works correctly on different browsers and operating systems. The same script can run on any Selenium platform.
System functional testing: Create regression tests to verify application functionality and user acceptance.

Disadvantages:

  • It cannot switch between http and https protocols.
  • It cannot handle file upload
  • It is extremely complicated for first time users.

Selenium Remote Control

Selenium-RC is the solution for tests that need more than simple browser actions and linear execution. We can use Selenium-RC whenever our test requires logic which is not supported by Selenium-IDE. Selenium-RC uses the full power of programming languages to create more complex tests like reading and writing files, querying a database, and emailing test results.

Selenium

Features

  • We can use Java syntax to write test script
  • Easy to conduct Data Driven Testing
  • We can read files to get test data
  • We can store Test Results into files

Disadvantages

  • We can only run a limited number of concurrent tests on the same remote control before seriously impacting its stability.
Browser



Firefox 3.x,Firefox 3, Firefox 2

IE 8,IE 7,IE 6

Safari 4,Safari 3 ,Safari 2

Opera 10,Opera 9,Opera 8

Google Chrome

Selenium-IDE



Record and playback tests

Test execution only via Selenium-RC*

Test execution only via Selenium-RC

Test execution only via Selenium-RC

Test execution only via Selenium-RC(Windows)

Selenium-RC



Start browser, run tests

Start browser, run Tests

Start browser, run tests

Start browser, run tests

Start browser, run tests

Operating Systems


Windows, Linux,Mac

Windows

Mac

Windows, Linux, Mac

Windows

* Tests developed on Firefox via Selenium-IDE can be executed on any other supported browser via a simple Selenium-RC command line.

References

Be Sociable, Share!
Categories: Programming / tutorials Tags: , ,
  1. July 17th, 2013 at 09:45 | #1

    Hi there! Do you know if they make any plugins to help with SEO?

    I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good success.
    If you know of any please share. Kudos!

  2. Irsath
    March 4th, 2013 at 00:05 | #2
  3. tomas
    September 16th, 2012 at 21:45 | #3

    @gayathri
    Hi, just I send this email regarding to comment, in this list, becase I wanna start to study this automated and really need to know in wich way I have to start? I don’t have any idea where is the start point for study and work for test website.
    could you help me, pls?
    thanks
    sincerely
    tomas

  4. Punitha
    February 27th, 2012 at 07:57 | #4

    Hello,
    pls clear my doubt……..
    i’m a beginner of selenium tool.first download and instal the tool,at the time of installing ask to install xpi file?what is meant xpi file?how to install selenium in our system…..

  5. Chaitanya
    February 14th, 2012 at 05:42 | #5

    @Deepak
    Selenium is a Functional Testing Tool for Web Application
    You need to know any one Programming language for Scripts(i.e C#, Ruby, Perl, Java, PHP)
    You can use any of Development IDE tool for Scripting
    Let me know in which language are you perfect, so that I can Explain to you

  6. Chaitanya
    February 14th, 2012 at 05:41 | #6

    @gayathri
    Selenium is a Functional Testing Tool for Web Application
    You need to know any one Programming language for Scripts(i.e C#, Ruby, Perl, Java, PHP)
    You can use any of Development IDE tool for Scripting
    Let me know in which language are you perfect, so that I can Explain to you

  7. gayathri
    January 21st, 2012 at 00:39 | #7

    i know clear details about selenium tool and hw to use that tool if anybody knows please send my mail i need details about that tool

  8. December 14th, 2011 at 00:53 | #8

    If you have please send me the tutorial of selenium tool…i want to know how can we do the automation by using the SELENIUM tool..Thank you.

  9. joe
    November 23rd, 2011 at 09:56 | #9

    The selenium team has been making steady progress lately, really good software.

    I need selenium the other day and used http://testingbot.com to run the tests, pretty nice tool.

  10. sameer
    July 1st, 2011 at 02:04 | #10

    Can i know how to automate the Application using selenium?If you have please send me the tutorial of selenium tool…Thank you.

  11. raju
    March 7th, 2011 at 08:38 | #11

    can i just know how selenium works in other browsers without using selenium IDE

  12. Shank
    September 30th, 2010 at 13:21 | #12

    Great post

  13. NSK
    August 31st, 2010 at 06:20 | #13

    @Martin

    Selenium not working with Opera 10 under Windows too.

  14. August 11th, 2010 at 07:17 | #14

    good summary, in Opera 10.10 under linux (k+ubuntu) not work.

    good luck

  15. Glenn
    June 3rd, 2010 at 12:48 | #15

    great post!!
    how is the support for groovy?

  1. June 10th, 2010 at 09:54 | #1
  2. January 21st, 2013 at 12:30 | #2

Get Adobe Flash playerPlugin by wpburn.com wordpress themes