DEV Community

Priyadharsini RK
Priyadharsini RK

Posted on

What is Selenium and why do we use it for Automation

What is Selenium and why do we use it for Automation:

Selenium:

Selenium is an automation framework and open source software(o need to pay or owned licensed to download this software from https://www.selenium.dev/ website.
Enter fullscreen mode Exit fullscreen mode

• It is created by Jasson Huggins in 2004. It was written in pure Java.
• Selenium can be used with various other programming languages like Python, JavaScript, C#, Java, PHP and so on.
• With selenium we can validate or verify the web applications.
• Selenium is predominantly used in Automation Testing

Automation:

• Automation is a technology that is used to perform certain tasks with minimum or no human interactions or interference or efforts.

• It could run the tests directly on the target browser, drive the interactions on the required web page and rerun them without any manual input. It eliminates repetitive manual testing that consumes lots of time and effort.

• Selenium is an open-source software of tools and libraries that is used for browser automation.

• It allows users to test their websites functionally on different browsers like Microsoft edge, google chrome, firefox, Opera, etc.,

Perform Cross browser testing to check if the website functions consistently across different browsers.

• Can be used to multiple operating system like windows, mac, linux /unix

Advantages of Using Selenium for automation testing:

1.Language and Framework Support :
Selenium as it supports all major languages like Java, Python, JavaScript, C#, Ruby, and Perl programming languages for software test automation.
You can write your scripts in any of these programming languages and Selenium converts it into Selenium compatible codes in no time
2.Open Source availability:
Selenium is a publicly accessible automation framework and is free, with no upfront costs. So, being open source also helps you customize the code for better code management and enhance the functionality of predefined functions and classes. Selenium has become the most reliable web automation tool because of the ease of generating test scripts to validate functionality.
3.Multi browser Support:
“One Selenium script for all browsers” is what the Selenium community has been working on and improvising every day. No need to rewrite scripts for every browser, just one script for all browsers.
4.Support across various operating system:
Selenium is yet a highly portable tool that supports and can work across different operating systems like Windows, Linux, Mac OS, UNIX, etc, can create Selenium test suites over any platform .
5.Ease of Implementation:
This framework is very easy-to-use tool. Selenium provides a user-friendly interface that helps create and execute test scripts easily and effectively. You can also watch while tests are running. You can analyze detailed reports of Selenium tests and take follow-up actions.
6.Reusability:
Selenium is not an all-inclusive web automation testing tool. Hence, it needs third-party frameworks and add-ons to broaden the scope of testing.
For example, we need to integrate Selenium with TestNG and JUnit for managing test cases and generating reports.
7.Flexibility:
Selenium features like regrouping and refactoring of test cases. This helps developers and testers in quick changes to the code, reducing duplication, minimizing complications and improving maintainability.
8.Parallel Tests execution:
With the help of Selenium Grid, we can execute multiple tests in parallel, hence reducing the test execution time. And With the help of cloud-grids for cross-browser testing you can test across as many as hundreds of browsers in parallel using Selenium.
9.Less Hardware Usage:
If you compare Selenium with other vendor focused automation tools like QTP, UFT, SilkTest, you will find that Selenium requires less hardware as compared to other testing tools.
10.Easy to Learn and Use:
Selenium scripts are not something like writing hundred-page complex algorithm. Writing Selenium scripts is not more than writing a few pieces of codes to automate functionalities of our website.

Top comments (0)