Selenium Components



Let's explore one by one how Selenium components work:


Selenium WebDriver


Also known as Selenium 2.0, WebDriver runs test scripts via browser-specific drivers. Consists in:


  • API: Application programming interface. Transfer test scripts you write in Ruby, Java, Python or C# to Selenese (Selenium's own scripting language), via bindings.
  • Library: Hosts the API and language specific bindings. Although many third-party bindings exist to support different programming languages, the main client-side bindings supported by the main project are: Selenium Java (as Selenium jar files), Selenium Ruby, Selenium dotnet (or Selenium C#, available as . dll files), Selenium Python and Selenium JavaScript (Node).
  • Driver: Executable module that opens a browser instance and runs the test script. Browser-specific: For example, Google develops and maintains the Chromedriver for Selenium to support automation in Chromium/Chrome.
  • Structure: Library support for integration with programming or natural language testing frameworks, such as Selenium with Cucumber or Selenium with TestNG.


Selenium Grid


The Grid component helps the user to minimize execution time by being able to run multiple scripts at the same time on an unlimited number of remote devices. This process is known as parallel testing.


Selenium Grid is also seen as a smart server that helps route test commands and browser instances to all remote devices. It uses two main components: the server and the remote device.


Selenium IDE


It is an add-on available in Chrome and Firefox that allows the user to register "natural" interactions in the browser and be able to generate code in different programming languages, for example, it can be generated in C#, Java, Python and Ruby, in addition to the language itself. Selenium Scripts: Selenese.


It is also for testers to enable “recording” within the IDE so they can play the test scenario in the browser. Its defect is that the generated code is usually too complicated to be used in scripts for automatic tests.

What is Selenium?

As they explain on their official website “Selenium is a general project for a range of tools and libraries that enable and support web browser automation. It provides extensions to emulate user interaction with browsers, a distribution server to scale browser allocation, and the infrastructure for implementations of the W3C WebDriver specification that allows you to write interchangeable code for all major web browsers.

Features of Selenium
  • It is primarily for automating web applications for testing purposes, but it is certainly not limited to that.
  • Boring web-based administration tasks can (and should) be automated too.
  • Provides extensions to emulate user interaction with browsers.
  • Selenium brings together browser vendors, engineers, and enthusiasts to promote an open discussion on web platform automation.
  • At the core of Selenium is WebDriver, an interface for writing instruction sets that can be run interchangeably in many browsers.