Year-End Discount: 10% OFF 1-year and 20% OFF 2-year subscriptions!

Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

selenium
webdriver
test
automation
browser

What is the Selenium WebDriver?

Educative Answers Team

Tired of LeetCode? 😩

Learn the 24 patterns to solve any coding interview question without getting lost in a maze of LeetCode-style practice problems. Practice your skills in a hands-on, setup-free coding environment. 💪

Selenium is a free and open-source automated testing suite for Web User Interfaces. Its tool suite provides automated testing for all types of web applications. The suites, or components, are:

  • Selenium IDE: A very simple automated testing browser extension for Firefox.
  • Selenium Remote Control (RC): An extensive automation testing tool for browsers.
  • Selenium Grid: Used to automate tests in parallel on different machines, browsers, and operating systems.
  • Selenium WebDriver: Which improves on Selenium RC, is the latest addition to the suite.

We are concerned mainly with the Selenium WebDriver component, however, it is essential to understand key differences between these.

Selenium Webdriver

The Selenium WebDriver component integrated the WebDriver API. It allows you to use a programming language to create test scripts for a web application. The supported languages are:

  • Java
  • C#
  • Python
  • PHP
  • Perl
  • Ruby

The use of programming languages to write tests means one can now employ the use of conditional statements, such as if-else, and loops.

How does it differ from the other components?

Unlike other components like Selenium RC, which use another server to act as a middleman for communication with the browser, Selenium WebDriver’s architecture is such that it communicates directly with the browser from the OS level. Therefore, it naturally follows that it has a much faster execution time because of direct communication with the browser.

svg viewer

It also has support for several browsers, unlike Selenium IDE, which only supports Firefox and Google Chrome.

svg viewer

Note: The HtmlUnit browser in the above figure is a headless browser - a special type of browser with no GUI. This makes automated test execution cycles rapid - because no time is taken waiting for page elements to load. Selenium RC, for instance, does not support headless browsers.

It is also designed to support dynamic webpages - where elements on the page change without the entire page reloading itself. With recent web technologies, more and more webpages are dynamic, making it very well suited for modern web applications.

RELATED TAGS

selenium
webdriver
test
automation
browser
Copyright ©2022 Educative, Inc. All rights reserved

Tired of LeetCode? 😩

Learn the 24 patterns to solve any coding interview question without getting lost in a maze of LeetCode-style practice problems. Practice your skills in a hands-on, setup-free coding environment. 💪

Keep Exploring
Related Courses