Your ultimate guide

About Selenium

What is Selenium?
    It is the suite of open-source tools to automate web applications (only web applications) across different operating systems and browsers

Similar software like selenium -> UFT, QTP, Cypress, Tosca, -----

Component of selenium:
1. Selenium IDE 
2. Selenium Web Driver 
3. Selenium Grid 
4. Selenium RC (Remote Control)
5. Selenium IDE (Integrated Development Environment):

Selenium IDE (Integrated Development Environment):
    Is an open-source web automation testing tool. It’s not an executable program, it’s just a plug-in/extension & that supports only Chrome and Firefox web browsers.

    Selenium IDE – records the browser interactions (Action) & playback tests in the browser.


       Even without knowing the programming language, we can automate the web application – In real-time organizations, we never use it – It will record all your actions and save it as a package & we can play that repeatedly.

    We can also export this actions file package to different programming languages like c#, Java, Python, and Ruby (automatically code will be generated.)

For that: - Right click on the action file -> click on Export -> Select language we want to convert -> Click on Export -> Save the file

 
 
Selenium Web Driver:

It is a web automation framework that allows you to execute your automation script against different browsers and operating systems. 
Selenium Web Driver drives a browser natively, as a real user would, either locally or on remote machines. 
It is also known as Selenium 2.0. 
All Selenium Projects released under the Apache 2.0 License
It Supports browsers such as Chrome, Firefox, Edge, Safari, Opera, HtmlUnitDriver (Headless browser)

  • HTML UnitDriver is the most lightweight and fastest implementation headless browser for WebDriver. It is based on HtmlUnit. 
  • It is known as Headless Browser Driver. It is the same as Chrome, IE, or Firefox driver, but it does not have GUI so one cannot see the test execution on screen.


- It supports in maximum all popular Operating systems such as – Windows Operating System, Mac OS, and Linux. 
- It supports programming languages such as – Java, c#, Ruby, Python, Java Script, -Kotlin. 

Advantages:
1. It is an open-source, freeware and portable tool
2. It supports many operating systems.
3. It supports various browsers.
4. It supports various programming languages.
5. It supports parallel test execution.
6. It uses very less CPU and RAM consumption for script execution.
7. It can be integrated with the TestNG testing framework for testing our applications and generating reports.
 8. It can be integrated with Jenkins, Maven, GitHub and other tools for DevOps implementation. 
 
Disadvantages:
1. It only supports web-based applications and does not support windows based applications.
2. No centralized maintenance of objects.
3. It is difficult to test Image based applications.
4. No reliable support like Commercial Tools.
5. Difficult to set up the environment.
6. It needs outside support for report generation activity like dependence on TestNG or Jenkins.

 

Selenium Grid:
- If you want to scale by distributing and running tests on several machines and manage multiple environments from a central point, making it easy to run the tests against a vast combination of browsers/OS, then you want to use Selenium Grid.
- The Grid can minimize test runtime—by executing multiple test scripts on any number of remote devices at once. This is called parallel testing.
- The two main components needed for this (other than the test script from client-side/tester) are:
1.  ‘Hub’ (server):
     Accepts access requests from WebDriver clients. Routes JSON test commands to remote drivers on registered ‘nodes’.
2.  ‘Node’ (remote device):
    Contains a native OS, browsers, and remoteWebDriver.

Selenium RC:
In selenium Rc, to run automation Script on the browser, we need a Remote Control Server to Communicate with the web browser.
- This is a very old process, also known as Selenium 1.
- Now we have selenium webDriver, by webDriver, we can interact with a web browser.

History of Selenium: 

*  2004 -Selenium was created by Jason Huggins at ThoughtWorks in Chicago.
*  2005 -Selenium RC (Remote Control).Also known as Selenium1.0
*  2006 -Selenium IDE was created by Shinya Kasatani. Shinya Kasatani wraps the Selenium driver code in an IDE module in the Firefox browser. He donated to the Selenium Project.
*  2007 -Selenium WebDriver was launched at Google
*  2008 -The whole Selenium team decided to merge Selenium WebDriver and Selenium RC in order to form a more powerful tool called Selenium 2.0
*  2008: At Thought Works, Philippe Hanrigoucreates a server which would allow testers to access and run tests on browser instances on any number of remote devices. This becomes known as the Grid
*  2016:Selenium RC gets deprecated and WebDriver becomes standard implementation—Selenium 3.0.
*  2019:WebDriver becomes a W3C standard protocol

No comments:

Post a Comment