Selenium Architecture

  

Selenium WebDriver Architecture – Overview

Selenium WebDriver follows a client-server architecture and allows direct communication between test scripts and browsers.


Components of the Architecture:

  1. Test Script (Client Layer)

    • Written in any supported language (Java, Python, C#, etc.)

    • Uses Selenium APIs

  2. Selenium WebDriver

    • Acts as a bridge between the test script and the browser

    • Sends commands from test scripts to the browser driver

  3. Browser Driver

    • Each browser has its own driver (e.g., ChromeDriver, GeckoDriver for Firefox)

    • Accepts commands via HTTP (JSON Wire Protocol or W3C protocol)

    • Converts commands into actions performed on the browser

  4. Real Browser

    • Chrome, Firefox, Edge, Safari, etc.

    • Executes the actions like clicking, typing, navigating, etc.


Selenium Architecture Diagram 










Working of Selenium Architecture:

  1. Test script sends a command (e.g., click button).

  2. WebDriver forwards it to the browser-specific driver.

  3. The driver communicates with the browser via native APIs.

  4. The browser executes the command.

  5. Response is sent back via the same path.

No comments:

Post a Comment