Skip to main content

Selenium Web Driver Hierarchy

 

Extends

WebDriver Extents Search Context

Firefox Extends Remote WebDriver

IE Driver Extends Remote WebDriver

Safari Extends Remote WebDriver

Chromium Extends Remote WebDriver

Reason

Common Interface – Certain browsers inherits the common behaviours from Remote WebDriver, these common interfaces allow the developers and tester to perform their operation such as commands and methods across different browsers.

Code Reusability: -By leveraging the capabilities provided by Remote web Driver, the browser specific driver can reuse the common functionality for communication with selenium WebDriver and browser.

Consistent Architecture-Helps this architecture to compatible with different browsers, consistency simplifies the design of the selenium WebDriver framework.

Remote Execution- t allows users to run their tests on a remote machine (e.g., on a Selenium Grid) by providing a central hub for test execution.

Edge and Chromium Extends Chromium Driver.

Reason

 The Chrome and Edge rooted from Chromium WebDriver desire for common and reusable codebase,

 

Implements

Remote Web Driver Implements the JavaScript Executor, WebDriver, Take Screenshot  

Reason -Remote WebDriver has multiple Interfaces and including JavaScript Executor, WebDriver, Take Screenshot  

WebDriver – Primary interface that defines set of methods interacts with browsers, used as a generic WebDriver, and control all instances regardless of remote or local.

JavaScript- Implementing JavaScript Executor allows Remote Web Driver to execute JavaScript commands, providing additional flexibility for advanced interactions and manipulations that may not be achievable through standard WebDriver commands.

Takes Screenshot Interface: which is a valuable feature for debugging, reporting, and capturing visual evidence during test execution.

RemoteWebDriver provides additional functionality and interfaces to support various features. Some of the notable interfaces and functionalities implemented by Remote WebDriver include:

 

  1. Capabilities:
    • The Capabilities interface represents a set of key-value pairs describing the desired capabilities of a browser.
    • Remote WebDriver provides methods to set and retrieve capabilities, allowing users to configure and customize the behavior of the remote browser.
  2. HasInputDevices:
    • The HasInputDevices interface provides methods for interacting with input devices such as the keyboard and mouse.
    • Remote WebDriver implements this interface, allowing users to perform keyboard and mouse actions on the remote browser.
  3. Has Touchscreen:
    • The Has Touchscreen interface provides methods for interacting with touch-enabled devices.
    • Remote WebDriver implements this interface to support touch interactions when working with touch-enabled browsers or devices.
  4. Has Capabilities:
    • The Has Capabilities interface allows retrieving the capabilities of a WebDriver instance.
    • Remote WebDriver implements this interface, providing a way to obtain the capabilities of the remote browser.
  5. Location Context:
    • The Location Context interface represents an object that has a location on the screen.
    • Remote WebDriver implements this interface, allowing users to retrieve the location of the browser window.
  6. Application Cache:
    • The Application Cache interface provides methods to interact with the browser's application cache.
    • Remote WebDriver implements this interface to support interactions with the application cache.
  7. SessionIdProvider:
    • The SessionIdProvider interface allows retrieving the session ID associated with a WebDriver instance.
    • RemoteWebDriver implements this interface, providing access to the unique session ID of the remote browser session.
  8. Network Connection:
    • The Network Connection interface provides methods for controlling network connections.
    • Remote WebDriver implements this interface, allowing users to simulate different network conditions during testing.

 

Comments