Open In App

Selenium Basic Terminology

Last Updated : 16 Oct, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Selenium is a very well-known open-source automated testing framework mainly used to automate tasks and perform various automation tests related to web browsers. It provides a wide range of suites and libraries to do various tasks and make the work easy for developers and testers. Using Selenium, developers can interact freely with the elements of any website, automate various web actions, and also test if the application is working as it should, i.e., find out if there is any bug present in that application or not.

What is Selenium?

Selenium is an open-source framework and a set of tools that are used by developers (mostly testers) to automate some processes related to browsers or web applications.

  • Selenium provides a way to interact with the web elements, web applications, browsers, etc. programmatically and lets the developers/testers automate some of the processes.
  • It supports a wide range of programming languages so that the developers/testers don’t have to think about the programming language or need to learn any new language.
  • It is especially used for Automated Testing, Cross-Browser Testing, Regression Testing, Functional Testing, Load Testing, etc.

Features of Selenium

  • Browser Automation: The main job of Selenium is to automate browsers like Google Chrome, Microsoft Edge (Internet Explorer), Safari, Firefox, etc. It mainly simulates the process of using the browser in place of a human like clicking links, clicking buttons, closing tabs, etc.
  • Multiple Browser Support: Selenium can work with various browsers as mentioned above, it uses different WebDrivers designed for specific browsers to carry out the automation and testing processes.
  • Multiple Programming Language Support: Apart from supporting different browsers, Selenium also supports different Programming Languages like C#, Java, Python, Ruby, JavaScript, etc. So that the developers might not struggle with the language barrier.
  • Page Object Model (POM): It is a design pattern used in Selenium, using Developers can create a single automation code that can be reused for a certain type of webpage, and define them as a separate class so that they do not overlap with each other.
  • Parallel Test Execution: Selenium also supports the test cases to be run in parallel so that it doesn’t take much time to execute the test cases uses fewer resources, and becomes much more efficient.
  • Supports different Test frameworks: Selenium supports various renowned test frameworks like TestNG, JUnit, NUnit, etc.
  • WebDriverWait Feature: Selenium’s WebDriverWait feature allows developers to wait for some time until a specific condition turns out to be true. This is helpful while dealing with dynamic web elements.

What is Automation Testing?

In layman’s terms, automation testing is the process of testing various software using different automated tools and programmized scripts.

  • Automation testing aims to increase the speed of testing and testing efficiency.
  • It is also helpful to improve the accuracy of the test results by making the process faster than manual testing.
  • Automation testing is mainly useful in large-scale software projects and complex software, in which manual testing takes a lot of time to execute.

Why Automation Testing?

Automation testing has various benefits, some of which are listed below –

  • Speed and Efficiency: Using Automation, the test cases can be executed way faster. The results will also be generated faster and it would also help for Agile development Cycle and produce software updates quicker and better.
  • Repetitive Task: Automation Testing can ease the pressure of doing repeated tasks again and again manually.
  • Consistency and Accuracy: Automation testing doesn’t require any human interference during the testing phase, which reduces the chance of overlooking any tiny functionalities present. The results are always better and more accurate than they would have been for Manual testing.
  • Cost-Effective: Initial setup might be costlier than manual testing, but in a longer time Automation testing is very much cost-effective, especially for repetitive tasks.
  • Continuous Integration and Continuous Deployment (CI/CD): Automation testing is also helpful in CI/CD because any new code or script will be tested automatically before deployment, which ensures that there is no error and the validation check of the code is also done.

Selenium IDE

Selenium Integrated Development Environment (IDE) is a browser extension that is available for most renowned web browsers. Here many test cases are already available. Developers need to just install this extension in that specific browser and run the pre-written test cases to test the browser. Also, the testers don’t need to be proficient in any programming language to use it, as everything is already written. But it also gives the option to the testers to export those test cases into specific Programming languages.

  • It creates the test cases by observing the use of that specific browser by any user, which type of sites they are visiting, what links they are clicking, how many tabs they are opening etc.
  • After recording the user interactions it generates test scripts which can be either run or exported into specific programming languages.

Features of Selenium IDE

Selenium IDE has some of its unique features which makes it one of the best in the field of automation testing. Some of its features are listed below:

  • Record and Playback Test Cases: Selenium IDE lets the testers record their interactions with the software or the web applications, It may include clicking a button, clicking a link available on the web application, etc., and then create test cases based on them and replay those later. Using this way the testers don’t need to write test cases from scratch using any programming language.
  • Supports different browsers: Selenium IDE used to support only Mozilla Firefox during its release, now it supports almost every renowned web browser like Google Chrome, Microsoft Edge, etc.
  • Supports Multiple Programming Languages: Selenium IDE supports various renowned programming languages like Python, Java, C#, Swift, etc. so that the testers can export the test cases in the language they are comfortable with, no need to learn any separate language for that.
  • Parallel Test Execution: Selenium WebDriver also supports parallel test execution, which means that testers can run multiple tasks simultaneously.
  • Open Source – Selenium IDE is an open-source software that is available to download for free and it has a huge community too.

Selenium WebDriver

WebDriver is the heart and Soul of Selenium. it provides a programming interface through which developers and testers can write codes to simulate the testing process. Each browser has different web drivers associated with them, and developers can use many programming languages such as Java, Python, C#, Ruby, etc. to write code in the WebDriver and test it. Some of the renowned web drivers are ChromeDriver (For Google Chrome), GeckoDriver (For Mozilla Firefox), etc. Apart from language-specific Web Drivers such as Java WebDriver, Python WebDriver, C# WebDriver, JavaScript WebDriver, Ruby WebDriver, etc.

Features of Selenium WebDriver

  • Browser Compatibility: Just like Selenium IDE, Selenium WebDriver also supports multiple renowned web browsers like Google Chrome, Microsoft Edge, Mozilla Firefox, etc. This lets the testers test the applications in different web browsers.
  • Multiple Language Support: It also supports various renowned programming languages like C#, Java, Python, Ruby, etc. So that the testers can use any of their favorite programming languages to create the test cases.
  • Cross-Operating System Support: Selenium WebDriver supports multiple renowned Operating Systems like Windows, Linux, and MacOS, it ensures that the application runs smoothly in any operating system. Also, the testers can check that every operation of the application is working properly in every OS.
  • Headless Testing: Headless Testing a.k.a Headless Browser Testing is done when the test cases are run when there is no visible Browser UI. It is useful to run several test cases faster and smoother.
  • Capturing Videos and Screenshots: WebDriver can also capture screenshots and videos during the execution of the test cases so that those can be used later for debugging purposes.
  • Integration with other Frameworks – Selenium WebDriver is compatible with various renowned testing frameworks like JUnit, NUnit, TestNG, etc.
  • Mobile Testing: Selenium WebDriver can also be used for Mobile Testing using frameworks like Selendroid or Appium. Using these testers can also test mobile applications in Emulators or mobile devices

Selenium Grid

Selenium Grid is another sub-application of Selenium which is used to execute multiple test cases simultaneously in different web browsers. By doing this, it reduces the execution time a lot. All these test cases can be controlled by a centralized application which acts like a hub.

Features of Selenium Grid

  • Supports Parallel Test Execution: Selenium Grid lets the test cases run parallel in different machines (nodes) simultaneously. It reduces the total time for the test execution.
  • Cross-Browser and Operating System Testing: Just like WebDriver, Selenium Grid also runs in almost all of the renowned browsers like Google Chrome, Microsoft Edge, Firefox, etc. It also runs smoothly in renowned operating systems like Linux, Windows, MacOS, etc.
  • Horizontal Scaling: Selenium Grid also supports horizontal scaling by adding more machines to the Grid, so that more test cases can be run simultaneously and less time will be needed.
  • Resource Management: Grid also lets the testers choose in which machine they would like to run which test cases, which means that high-performing machines will be allocated to run those test cases that require more resources.

Selenium vs QTP

Selenium is an open-source tool or a set of tools or frameworks used for automation testing. It supports various programming languages like C#, Java, Python, JavaScript, Ruby, etc. It was developed by Thoughtworks in 2002 solely for testing purposes. It supports mostly all renowned browsers and operating systems like Mac, Linux, Windows, etc.

On the other hand, QTP (QuickTest Professional) is an automation function testing tool developed in 2019 by Mercury Interactive. It is useful to test both web and desktop applications and it only supports the Visual Basic Programming language, it is not open-source like Selenium. One of its major drawbacks is that it only works on Windows

Below is the difference between Selenium and QTP:

Parameters

Selenium

QTP

License

Open-source, available for Free.

Requires Commercial License.

Main Use

Testing Web Applications only.

For general testing purposes, supports Web Applications, Mobile Applications, and Desktop Applications.

Used Programming Language

Java, C#, Python, Ruby, etc.

VBScript, JavaScript, C#, etc.

Supported Frameworks

TestNG, JUnit, etc.

Supports keyword-driven and data-driven frameworks.

Possible Customization

Highly Customizable, as it is an open-source.

Limited Customization approach, as it requires a license.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads