Most importantly, we can’t replace manual testing with automation. For any application in the initial stage manual testing is very essential. Once the application is stable then need to go for automation to avoid repetitive testing. We can say regression testing.
It is an open source tool developed by ThoughtWorks. Basically selenium is used to automate web based application testing i.e. UI testing. It will automate the control of a browser so that repetitive tasks can be automated. There are 4 components in selenium to test the web application to achieve our requirements,
Usually those who are beginners for selenium thinks that, selenium is a tool it has its own interface, need to install and start automate on that window. But the reality is completely different. Selenium is just a jar it does not have interface except selenium IDE plugin.
ThoughtWorks introduced 4 selenium components they are,
- Selenium IDE
- Selenium RC
- Selenium WebDriver
- Selenium Grid
First of all we need to know that, Selenium IDE is an extension (plugin) for Firefox. This allows to do record and playback tests. In this approach, recorder has to be turned ON & complete the flow manually. It is just like how a manual tester tests the application. But in back-end the recorder will record the actions performed. These actions are just like identifying the controls, clicking on buttons, filling the data in text boxes. Recorded action can be repeated whenever it is needed.
Record and Play process looks very easier and one can be easily tempted to follow this approach. But in the Application Life cycle, it will go through so many modifications, if there is a small modification in the application the recording will fail to identify the objects during its recording as their properties might be changed. If any change in the application some modifications has to be done to the recorded scripts.
This approach difficult to maintain as application changes frequently. If application is very stable and application flow is very simple then this approach will be useful.
It is a client/server system that allows you to control web browsers locally or on other computers, using almost any programming language and testing framework. Here Automation tester has to write code to identify the controls, perform actions on controls (clicking, filling data) with help of utilities provided by tool.
We should know that in selenium RC, server acts as a “middleman” between your Selenium commands and your browser. This will be clearly explained below in section Selenium RC vs WebDriver.
On a higher level it seems very difficult at starting but if a proper framework is designed then this approach will be very easier. It might take more time to do this stuff but in longer run maintainability will be very easier by using Selenium RC approach.
WebDriver is a browser automation framework that accepts commands and sends them to a browser. It provides APIs in different languages to allow for more control and the application of standard software development practices.
Whatever the commands issued in the code will be interpreted into Webservice methods (HTTP methods to a specified URL) and the Remote Driver will receive the HTTP request (commands) and execute them in the browser then send the response back.
Selenium Grid makes it possible to use the Selenium APIs to control browser instances distributed over a grid of machines, allowing more tests to run in parallel.
Selenium RC Vs WebDriver
- 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.
- Once injected, Selenium Core will start receiving instructions relayed by the RC Server from your test program.
- 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.
Related to performance is concern WebDriver is faster than Selenium RC since it speaks directly to the browser uses the browser’s own engine to control it.
WebDriver’s API is simpler than Selenium RC’s. It does not contain redundant and confusing commands.
4. Browser Support
WebDriver can support the headless HtmlUnit browser but RC not.
- It Cannot Readily Support New Browsers but RC does.
- It has no built-in command that automatically generates a Test Results File.
Recommended article for you,
Hey, Now it is your time! Drop a comment if more details needed or if any update requires. Your comments are more valuable to improve our site to help others.