What is difference between selenium 1 and Selenium 2

SeleniumAutomation TestingTesting Tools

Selenium or known as RC (Remote Control) and Web Driver differ in many aspects but the key difference comes in the implementation layer or in simple words the architecture of both of them.

As name suggest, RC is a Remote Control which works by taking the remote of the browser and then injects the automation code to be tested by injecting the custom scripts written.

The Web Driver (known as Selenium 2) works on the browser directly and uses browsers in-built features to trigger the automation test written by tester. Web driver is the successor of Remote Control.

The architecture of Selenium Web driver is as follows −

Both of these flavors of Selenium work the same way by remote controlling a browser which can be called from elsewhere.

Selenium 1Selenium 2
Selenium 1 = Selenium Remote Control.Selenium 2 = Selenium 1 + WebDriver
Depends on the core libraries which could run on any browser which would support JavaScript.It runs JavaScript natively and test cases created can be run on different browsers.
Selenium RC servers act as a mediator between Selenium command and browser.WebDriver talks to the OS directly using the OS’s native capability.It uses browser driver for this communication
While testing Selenium RC injects JavaScript program(Selenium Core) into the browser.WebDriver contributes its object-oriented API for Document Object Model (DOM) interaction and browser control.
It works by intimating the user action as commanded by the JavaScript commands but that does not enforces user to write automated test cases in only JavaScript. It can use Java, Ruby, C#, Perl, Python etc.It also uses multiple programming languages such as Perl,Ruby,Python,C#,Java,PHP,.Net etc.
If it comes to speed, it is a bit slower due to the intermediate action of RC Server.It is speedy as it talks directly to the browser without using any internal proxy server.
Does not support Mobile Application Testing.Uses AndroidDriver and iphoneDriver for mobile Automation.
Requires real browser to work.Also supports headless HTMLUnit browser which facilitates faster execution of tests because it involves no time in waiting for page elements to load.
Can support new browsers.Cannot support new browsers.
raja
Published on 05-Aug-2019 14:50:15
Advertisements