Selenium WebDriver Architecture
To understand how Selenium works, we should understand Selenium WebDriver architecture. We will understand architecture
by below diagram:
When we run our script, Selenium translates test script instructions into browser commands according to specific browser through the appropriate browser driver. The driver then makes that happen in the actual browser.
Selenium WebDriver Architecture Diagram:
When we run our script, Selenium translates test script instructions into browser commands according to specific browser through the appropriate browser driver. The driver then makes that happen in the actual browser.
For Example, if we want to click on a button on chrome
browser, then we will need to use chrome driver
to perform this action. When
we run our script, selenium will translate
our test script to chrome browser command using chrome driver and then perform the
action on the browser.
Selenium WebDriver Architecture components
Let's understand each component one by one from bottom to top:- Programming Languages: A Tester can write selenium script in multiple supported languages.
- Test Script: Test script is set of instructions that we want to perform on web page.
- Selenium WebDriver: Selenium Web Driver acts as translator between your test script and the web browser.
- Web Browser: Each browser (Chrome, Firefox, etc.) has its own special driver that helps selenium to talk to specific browser and perform different tasks like clicking button, typing in input etc.
If you haven't understand the architecture completely not to worry. We will learn step by step and
then you will understand things easily.
Next we will learn how to do Selenium setup along with Java in
local for practice.