- Selenium Tutorial
- Selenium - Home
- Selenium - Overview
- Selenium - Components
- Selenium - Automation Testing
- Selenium - Environment Setup
- Selenium - Remote Control
- Selenium IDE Tutorial
- Selenium - IDE Introduction
- Selenium - Features
- Selenium - Limitations
- Selenium - Installation
- Selenium - Creating Tests
- Selenium - Creating Script
- Selenium - Store Variables
- Selenium - Alerts & Popups
- Selenium - Selenese Commands
- Selenium - Actions Commands
- Selenium - Accessors Commands
- Selenium - Assertions Commands
- Selenium - Assert/Verify Methods
- Selenium - Locating Strategies
- Selenium - Script Debugging
- Selenium - Verification Points
- Selenium - Pattern Matching
- Selenium - JSON Data File
- Selenium - Browser Execution
- Selenium - User Extensions
- Selenium - Code Export
- Selenium - JavaScript Functions
- Selenium - Plugins
- Selenium WebDriver Tutorial
- Selenium - Introduction
- Selenium WebDriver vs RC
- Selenium - Installation
- Selenium - First Test Script
- Selenium - Driver Sessions
- Selenium - Browser Options
- Selenium - Chrome Options
- Selenium - Edge Options
- Selenium - Firefox Options
- Selenium - Safari Options
- Selenium Web Elements
- Selenium - File Upload
- Selenium - Locator Strategies
- Selenium - Relative Locators
- Selenium - Finders
- Selenium - Find All Links
- Selenium - User Interactions
- Selenium - WebElement Commands
- Selenium - Browser Interactions
- Selenium - Browser Commands
- Selenium - Browser Navigation
- Selenium - Alerts & Popups
- Selenium - Handling Forms
- Selenium - Windows and Tabs
- Selenium - Handling Links
- Selenium - Input Boxes
- Selenium - Radio Button
- Selenium - Checkboxes
- Selenium - Dropdown Box
- Selenium - Handling IFrames
- Selenium - Handling Cookies
- Selenium - Date Time Picker
- Selenium - Dynamic Web Tables
- Selenium - Actions Class
- Selenium - Action Class
- Selenium - Keyboard Events
- Selenium - Key Up/Down
- Selenium - Copy and Paste
- Selenium - Handle Special Keys
- Selenium - Mouse Events
- Selenium - Drag and Drop
- Selenium - Scroll Operations
- Selenium - Waiting Strategies
- Selenium - Explicit/Implicit Wait
- Selenium - Support Features
- Selenium - Multi Select
- Selenium - Wait Support
- Selenium - Select Support
- Selenium - Color Support
- Selenium - Errors & Logging
- Selenium - Logging
- Selenium - Exception Handling
- Selenium - Miscellaneous
- Selenium - Handling Ajax Calls
- Selenium - JSON Data File
- Selenium - CSV Data File
- Selenium - Excel Data File
- Selenium - Cross Browser Testing
- Selenium - Multi Browser Testing
- Selenium - Multi Windows Testing
- Selenium - JavaScript Executor
- Selenium - Headless Execution
- Selenium - Capture Screenshots
- Selenium - Capture Videos
- Selenium - Page Object Model
- Selenium - Page Factory
- Selenium - Record & Playback
- Selenium - Frameworks
- Selenium - Browsing Context
- Selenium Grid Tutorial
- Selenium - Overview
- Selenium - Architecture
- Selenium - Components
- Selenium - Configuration
- Selenium - Create Test Script
- Selenium - Test Execution
- Selenium - Endpoints
- Selenium - Customizing a Node
- Selenium Reporting Tools
- Selenium - Reporting Tools
- Selenium - TestNG
- Selenium - JUnit
- Selenium - Allure
- Selenium & other Technologies
- Selenium - Java Tutorial
- Selenium - Python Tutorial
- Selenium - C# Tutorial
- Selenium - Javascript Tutorial
- Selenium - Kotlin Tutorial
- Selenium - Ruby Tutorial
- Selenium - Maven & Jenkins
- Selenium - Database Testing
- Selenium - LogExpert Logging
- Selenium - Log4j Logging
- Selenium - Robot Framework
- Selenium - AutoIT
- Selenium - Flash Testing
- Selenium - Apache Ant
- Selenium - Github
- Selenium - SoapUI
- Selenium - Cucumber
- Selenium - IntelliJ
- Selenium - XPath
- Selenium Miscellaneous Concepts
- Selenium - Automation Frameworks
- Selenium - Keyword Driven Framework
- Selenium - Data Driven Framework
- Selenium - Hybrid Driven Framework
- Selenium - SSL Certificate Error
- Selenium - Alternatives
- Selenium Useful Resources
- Selenium - Quick Guide
- Selenium - Useful Resources
- Selenium - Automation Practice
- Selenium - Discussion
Selenium - Automation Testing
Selenium can be used extensively for web automation testing. It is often referred to as a suite of tools comprising of the tools mentioned below −
Selenium IDE
Selenium RC
Selenium Webdriver
Selenium Grid
Selenium IDE
Selenium Integrated Development Environment is an important part of the Selenium suite. It was first developed as a Firefox plugin, however now it is available in both Firefox and Chrome browser. Some of the features of Selenium IDE are listed below −
The recording, debugging, executing and editing of the functional tests can be done in Selenium IDE.
The scripts in Selenium IDE are developed in Selenese which is a scripting language in Selenium.
Selenium IDE commands help us to perform tasks like clicking a button or link, taking input in an edit box, obtaining a text from a webelement and so on.
Selenium IDE tests can be converted to formats like Java, C#, Python, TestNG, and so on. Its default format is in .html.
Selenium IDE tests can be exported and used in Selenium Webdriver and Selenium RC.
Selenium IDE does not require technical or programming knowledge. Hence it can be used only testing simple scenarios and not used to cover any complex use cases.
Selenium IDE does not give the feature of parameterization of tests for data driven testing.
Maintenance of objects and other reusable components are difficult in Selenium IDE, in case it is being used for complex testing projects.
Selenium Remote Control (RC)
Selenium Remote Control is a server implemented in Java. It can accept commands for browsers using the HTTP. Selenium RC has a Selenium RC server and a Selenium RC client. Selenium RC is outdated and it has been deprecated by Selenium.
Some of the features of Selenium RC are listed below −
Automation tests in Selenium RC can be developed in any programming languages like Java, Python, C#, and so on.
Selenium RC can be used to write automated tests for testing web applications.
Selenium RC comprises a proxy server which gives the provision to the browser to work as if that the application under test is available in the domain of the proxy server.
To initiate test execution, we have to create an instance of the Selenium RC server.
Selenium Webdriver
Selenium WebDriver (began from Selenium version 2 onwards) is the successor to Selenium RC which sends commands directly to the browser and retrieves results, hence it is faster than Selenium RC. It receives commands and passes them to the browser. This is done with the help of the browser drivers that sends commands to the browser and obtains the results.
Selenium version 2 combined the useful features of Selenium RC and Selenium Webdriver into Selenium Webdriver. Later on Selenium 3, added more features to Selenium Webdriver.
Selenium Grid
Selenium Grid is mainly used for parallel testing. It follows a hub(which is a central part and rest are considered as nodes) and node architecture. Selenium Grid enables us to execute varied tests in multiple machines simultaneously. Selenium Grid is used mostly with the intent of test execution rather than design.
Some of the features of Selenium Grid are listed below −
Presence of a hub machine which directs the execution on multiple machines using the Selenium Grid. Also, there are more than one node machines where the actual execution takes place.
Selenium Grid supports testing on multiple browsers and platforms.
Reduces execution time by allowing parallel execution of tests.
Currently the latest version of Selenium is on version 4. From the Selenium 4 version, the entire architecture is fully compatible with W3C - World Wide Consortium meaning Selenium 4 follows all the standards and guidelines given by W3C. We can get more information about W3C from the below link −
https://www.tutorialspoint.com/world-wide-web-consortium-w3c.
Differences Between Version 3.x and 4.x
The basic difference between Selenium 3.x and Selenium 4.x is that, in Selenium 3 the communication between client and server is done by JSON Wire protocol, however, from Selenium 4, there is direct communication between the server and client, following the W3C guidelines.
Before Selenium 4, the communication between the client and server was carried on using the JSON Wire protocol over HTTP. However, there is no existence of JSON Wire protocol from Selenium 4,and there is direct communication between the client and server using the W3C protocols.
Also, Selenium 4 gives some additional locators (apart from the regular locators like id, class, xpath, and so on) called the Relative locators with the help of the methods - above, below, near, toRightOf, toLeftOf, and chaining of multiple Relative locators. Selenium 4 also gives access to the ChromeDevTools which help for debugging, network traffic analysis, and other features that help in automation.
Selenium Web Driver architecture as per version 4.0 in a simplified diagram is described below −
Why is Selenium Used for Automating Testing?
Automation tests using Selenium can be written in multiple programming languages like the Java, C#, Python, JavaScript, and so on.
Selenium webdriver supports browsers like Chrome, Firefox, Safari, IE, and so on.
Selenium webdriver works on more than one platforms like Windows, Mac, Linux, Android, and so on.
Headless execution can be achieved with the help of the HTMLUnit Driver.
Selenium webdriver does not require a server to initiate test execution and it communicates directly with the browser.
Selenium is open-source and comes without any licensing cost.
Selenium can be extended for various technologies that expose DOM.
Selenium has a big community support to resolve issues.
Disadvantages of Using Selenium
Selenium supports only web based applications.
Selenium should not be used to automate tests on QR, captcha and barcode scenarios.
Selenium does not have an in-built object repository or recovery scenario.
Selenium has no default test report generation.
Selenium Webdriver requires programming and technical knowledge to develop automated tests.
Selenium Webdriver requires time to be more compatible and stable with new browsers.
Selenium Webdriver is difficult to set up since no vendor support is available.
This concludes our comprehensive take on the tutorial on Selenium - Automation. We’ve started with describing what is Selenium, and what comprises of Selenium - Selenium IDE, Selenium RC, Selenium Grid, and Selenium Webdriver, differences between Selenium 3.x and Selenium 4.x, why Selenium is used for automating testing, and disadvantages of Selenium.
This equips you with in-depth knowledge of the Selenium - Automation Testing. It is wise to keep practicing what you’ve learned and exploring others relevant to Selenium to deepen your understanding and expand your horizons.