Selenium:
Selenium is an open source automated testing Suite for web applications across different browsers and platforms.Selenium has 4 major components:
- Selenium Integrated Development Environment(IDE)
- Selenium Remote Control(RC)
- Web Driver
- Selenium Grid
1. Selenium Integrated Development Environment:
Selenium IDE is the simplest framework in the Selenium Suite and very easiest to learn. It has got record playback and saving tests and inbuilt reporting tool.
2. Selenium Remote Control:
Selenium RC was the flagship testing framework of the whole Selenium project for a long time.
This is the first automated web testing tool where it allows users to use their programming language they prefer.
RC comes in 2 forms:
2.1 Selenium Server:
- Selenium Server receives selenium commands from your program, interprets them and reports back the results of those running tests.
- Selenium Core is a Java Script program which executes selenium commands using browser's built-in Java Script Interpreter.
- Server receives selenium commands from your program using simple HTTP GET/POST requests.
2.2 Client Libraries:
- Client libraries which provide the application interface between each programming language and the Selenium RC Server. eg : Python , Java , PHP etc
As of version 2.25.0 RC, it supports following languages
- Java
- C#
- PHP
- Python
- Perl
- Ruby
3. WebDriver:
WebDriver itself proves it is better than Selenium IDE and RC.
It uses more object oriented approach eg: JsonWire Protocol and unlike RC, it doesn't rely on JavaScript for automation.
It is developed to support dynamic web pages where elements of the page may change without page reloading using AJAX.
Selenium WebDriver makes direct calls to the browser using native browser's support for automation.
RC injected javascript functions into the browser when browser was loaded and used its javascript to drive the AUT within the browser.
4. Selenium Grid:
Selenium Grid is a tool used together with Selenium RC to parallel tests across different machines or same machine but different browsers.
Uses Hub and Node concepts. The hub acts as a central source of selenium commands to each node connected to it.
My Personal Recommendation :
Use Selenium Web Driver for automating web browser operations and use any open source frameworks such as Robot Framework, Jasmine or Cucumber for logging and reporting.
driver = webdriver.Chrome('path of local chromedriver.exe');
Selenium RC is useful when your test cases are in different machine and your web application is running in a different machine. In that scenario , we can run selenium-server on the hosted machine and consume the url , and can run the test against the url.
driver = new RemoteWebDriver(new URL('http://172.20.20.39:4444/wd/hub'), capability);
Note: Selenium-Server should be running at 172.20.20.39 server and by default server will be running on port 4444.
Rest all browser session operations are same for both Selenium WebDriver and Selenium RC APIs.
Thank You!
Happy Learning
Thank You!
Happy Learning
Very good content
ReplyDeleteThanks Comrade:-)
DeleteI really thank you for your innovative post.I have never read a creative ideas like your posts.
ReplyDeletehere after i will follow your posts which is very much help for my career.
Selenium Training in Chennai
selenium training in velachery
JAVA Training in Chennai
Python Training in Chennai
Big data training in chennai
Android Training in Chennai
Selenium Training in Chennai
Selenium Training in Anna Nagar