1. PYTHON SELENIUM ARCHITECTURE
Selenium is one of the most widely used tools for automating web applications. When we use Selenium with Python, the architecture follows a structured flow that allows script to interact with browser efficiently. At a high level, Selenium architecture consistes of 4 main components:
**1. Selenium Client Library(Python)** The test scripts stays at this component. When writing automation code using Python, we use Selenium libraries like webdriver, find_element, etc.
Enter fullscreen mode
Exit fullscreen mode
from selenium import webdriver
driver = webdriver . Chrome () driver . get ( " https://google.com " )
Enter fullscreen mode
Exit fullscreen mode
Here, Python acts as a client that sends instructions.
**2. WebDriver** WebDriver acts as a bridge between Python code and the browser. It translates the commands into a format the browser understands.
Example: -> driver.get() - opens a webpage -> driver.find_element() - locates elements
** 3.…