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

Popular posts from this blog

Had you to design test cases for a complex feature. What factors did Tester consider, and how did prioritize test scenarios?

  Take an instance as new application has integrated into existing applications(i,e., Running on real time )Customer want to integrate their application into third party vendors in order to let the customer order their needs through our created app itself. Factors Consisdered : Error Handling , Functional Requirements , Edge cases , Non-Functional Parameters . Transaction Flow Flow1: Customer Land on third party vendors app and start picking their items. Flow2 : Picked Items has to go Cart Page and can see number of items added by visually. Flow3: Once click to checkout , it will allow the user to input their card details and processing transaction. Flow4:Once Transactions done, newly created app show the details of the order and online tracking number . Prioritize scenerios based on the Business Emergency and needs ,well in briefly communicate to team members to identify the Critical paths and prioritize the that test suite first and Start  the execution based on what need to...

Static and Non-Static

  What is the purpose of the static keyword in Java? The static keyword is used to declare class-level variables and methods . They belong to the class rather than instances of the class and can be accessed using the class name. can we use the static keyword for package level access? In Java, the static keyword is not used for controlling access levels. The static keyword is primarily used to define class-level members, such as variables and methods, that are associated with the class itself rather than with instances of the class. The concept of access levels, on the other hand, is controlled by access modifiers. public class MyClass {     public static int publicStaticVariable = 10;     static int packagePrivateStaticVariable = 20; // package-private by default     private static int privateStaticVariable = 30; } To summarize, while static is used to define class-level members, access modifiers (public, protected,...

Pre conditions and Post conditions in Test Ng.

Pre conditions and PostConditions in Test Ng. Vision of Preconditions and Postconditions: 👉 Ensuring Test Isolation: By using preconditions and postconditions, you ensure that each test method is executed in isolation, with a clean and consistent state. 👉Promoting Reusability: Setup and teardown tasks defined in preconditions and postconditions can be reused across multiple test methods, promoting code reuse and reducing redundancy. 👉Maintainability: Clearly defined preconditions and postconditions enhance the maintainability of test code. Changes or additions to the setup and cleanup logic can be made centrally in these annotated methods. TestNG PreConditions and PostConditions flow.   Before Suite (once) Before Test (once for each <test> in the suite) Before Class (once for each class with test methods in the <test> ) Before Method (before each test method) Test method execution After Method (after each test method) After Class (after all test methods in ...