Difference between Selenium RC and Webdriver

Difference between Selenium RC and Webdriver

Before the advent of WebDriver in  2006, there was another, automation tool called Selenium Remote Control. Both WebDriver and Selenium RC have following features:
·         They both allow you to use a programming language in designing your test scripts.
·         They both allow you to run your tests against different browsers.
So how do they differ? Let us discuss the answers.

1. Architecture

WebDriver's architecture is simpler than Selenium RC's.
·         It controls the browser from the OS level
·         All you need are your programming language's IDE (which contains your Selenium commands) and a browser.
Selenium RC's architecture is way more complicated.
·         You first need to launch a separate application called Selenium Remote Control (RC) Server before you can start testing
·         The Selenium RC Server acts as a "middleman" between your Selenium commands and your browser
·         When you begin testing, Selenium RC Server "injects" a Javascript program called Selenium Core into the browser.
·         Once injected, Selenium Core will start receiving instructions relayed by the RC Server from your test program.
·         When the instructions are received, Selenium Core will execute them as Javascript commands.
·         The browser will obey the instructions of Selenium Core and will relay its response to the RC Server.
·         The RC Server will receive the response of the browser and then display the results to you.
·         RC Server will fetch the next instruction from your test script to repeat the whole cycle.

2. Speed


WebDriver is faster than Selenium RC since it speaks directly to the browser uses the browser's own engine to control it.
Selenium RC is slower since it uses a Javascript program called Selenium Core. This Selenium Core is the one that directly controls the browser, not you.

3. Real-life Interaction

 WebDriver interacts with page elements in a more realistic way. For example, if you have a disabled text box on a page you were testing, WebDriver really cannot enter any value in it just as how a real person cannot.
Selenium Core, just like other JavaScript codes, can access disabled elements. In the past, Selenium testers complain that Selenium Core was able to enter values to a disabled text box in their tests. Differences in API      

4. API

Selenium RC's API is more matured but contains redundancies and often confusing commands. For example, most of the time, testers are confused whether to use type or typeKeys; or whether to use click, mouseDown, or mouseDownAt. Worse, different browsers interpret each of these commands in different ways too!
WebDriver's API is simpler than Selenium RC's. It does not contain redundant and confusing commands.

5. Browser Support

WebDriver can support the headless HtmlUnit browser
HtmlUnit is termed as "headless" because it is an invisible browser - it is GUI-less.
It is a very fast browser because no time is spent in waiting for page elements to load. This accelerates your test execution cycles.
Since it is invisible to the user, it can only be controlled through automated means.
Selenium RC cannot support the headless HtmlUnit browser. It needs a real, visible browser to operate on.

Limitations of WebDriver

WebDriver Cannot Readily Support New Browsers

Remember that WebDriver operates on the OS level. Also, remember that different browsers communicate with the OS in different ways. If a new browser comes out, it may have a different process of communicating with the OS as compared to other browsers. So, you have to give the WebDriver team quite some time to figure that new process out before they can implement it on the next WebDriver release.
However, it is up to the WebDriver's team of developers to decide if they should support the new browser or not.

Selenium RC Has Built-In Test Result Generator

Selenium RC automatically generates an HTML file of test results. The format of the report was pre-set by RC itself. Take a look at an example of this report below.
WebDriver has no built-in command that automatically generates a Test Results File. You would have to rely on your IDE's output window, or design the report yourself using the capabilities of your programming language and store it as text, HTML, etc.
Summary
·         WebDriver is a tool for testing web applications across different browsers using different programming languages.
·         You are now able to make powerful tests because WebDriver allows you to use a programming language of your choice in designing your tests.
·         WebDriver is faster than Selenium RC because of its simpler architecture.
·         WebDriver directly talks to the browser while Selenium RC needs the help of the RC Server in order to do so.
·         WebDriver's API is more concise than Selenium RC's.
·         WebDriver can support HtmlUnit while Selenium RC cannot.
·         The only drawbacks of WebDriver are:
·         It cannot readily support new browsers, but Selenium RC can.
·         It does not have a built-in command for automatic generation of test results.


Comments

  1. Thanks for the informative article about difference between Selenium RC and webDriver, Recently I had also posted one tutorial about Top5 Comparisons in Selenium vs QTP

    ReplyDelete
  2. One more important point that we need to be very clear about is Selenium RC injects javascript function into browsers when the web page is loaded. Selenium WebDriver drives the browser using browser's built-in support. Selenium WebDriver is a tool for testing web applications across different browsers using different programming languages.

    ReplyDelete
  3. I have been searching for quite some time for information on this topic and no doubt your website saved my time and I got my desired information. Your post has been very helpful. Thanks.
    software testing selenium training
    selenium testing training in chennai
    Best selenium training in chennai

    ReplyDelete
  4. I have been pursuing down an expanded time frame for data with respect to this issue and no weakness your site spared my plausibility and I got my pined for data. Your post has been remarkably useful.
    Education | Article Submission sites | MBA Guide | Technology

    ReplyDelete
  5. Thanx for sharing this article with us.

    Right now I am working on an automation projects and I know it takes time to learn Selenium. But in future Selenium is going to rule the automation industry.

    Regards
    Selenium Automation testing

    ReplyDelete
  6. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..

    selenium training in bangalore

    aws training in bangalore

    ReplyDelete
  7. The blog which you have shared is very useful for us to know how much the selinium is important in Corporate companies. Thanks for your information.
    selenium training in coimbatore
    best selenium training in coimbatore
    selenium training
    selenium course in coimbatore
    selenium course

    ReplyDelete
  8. According to the World Health Organization (WHO), 15% of the population have a disability, which is the reason Accessibility Testing has become important.
    Making Accessibility Testing a regular part of the software testing process, and implementing the necessary checks early and often can help improve the overall experience of using an application or website.

    Accessibility testing services

    ReplyDelete
  9. The above article "Difference between Selenium RC and Webdriver
    " is more informative. This is more helpful for our selenium course .Thanks for sharing

    ReplyDelete
  10. Thanks to share this informative content, You very well differentiated b/w Selenium RC and Webdriver. Good post

    QA Automation Testing

    ReplyDelete

Post a Comment

Popular posts from this blog

Handling Dynamic Web Tables Using Selenium WebDriver

Verify Specific Position of an Element

Read it out for TESTNG before going for an iterview