Introduction to Selenium WebDriver and Comparison with Selenium RC
Sometimes you may heard the term Selenium Webdriver is tool or framework etc. But in simple term , we can say WebDriver is nothing but an interface. Selenium WebDriver ,also known as Selenium 2.0 has been designed to overcome of the limitation of Selenium RC or Selenium 1.0.
What is Selenium RC?
Selenium RC or Selenium 1.0 was introduced before WebDriver. It required to start selenium server which used to set up a communication between the selenium client libraries and the browser.Server used to pass the selenium command to the browser. Then browser used to execute those selenium command by using its java script interpreter. There were some limitations when we needed to handle file upload, pop-ups handling,dialog etc.
WebDriver has been combined with Selenium 1.0 to become Selenium 2.0. It has been developed to overcome the limitation of Selenium 1.0.
Selenium 1.0 + WebDriver = Selenium 2.0
Difference between WebDriver and Selenium RC:
- Selenium WebDriver do not need Selenium server to execute tests.
- Selenium WebDriver is simpler and having more concise programming interface.
- WebDriver directly interacts with the Browser itself.
- It supports almost all the latest version of different browsers.
- WebDriver supports Web Applications as well as mobile applications.
- WebDriver provides a better support to execute Ajax applications (In ajax, element of the webpage will be loaded without browser loading or refresh).
- Selenium RC required Selenium server to executes the tests.
- Selenium Server used to serve as a middle man between browser and client libraries.
- There were some limitation when needed to work with dialog,pop-ups etc.
- Selenium supports only web Applications.
- Supported all browsers but not the latest versions.
- It used to inject selenium core into browser to pass the java script commands to the browser.
- It is not being used now as WebDriver has come. But still some maintenance projects are supported by this.
More details about selenium WebDriver:
Selenium WebDriver can be implemented by many classes which simplifies the code to write for automation. Selenium jars files can be configured with any desired IDE like IntelliJ IDEA or Eclipse.If a person knows core java , he/she should be able to start writing code using Selenium WebDriver.
It provides synchronization during script, handle native event on browsers. This is the main interface used for testing, having following implementing classes.