There are 2 ways of explaining how Selenium WebDriver works:
- easy
- technical
Lets see how easy is the first one.
It uses an analogy with taxi driving.
In taxi driving, there are typically 3 actors:
- the client; he tells the taxi driver where he wants to go and how to get there
- the taxi driver; he executes the client's requests; the taxi driver sends his own requests to the car
- the car; the car executes the taxi driver's requests
The client gets to the destination through dialogues that happen between the client - taxi driver and taxi driver - car.
In test automation with Selenium WebDriver (and other tools), there are 3 actors as well:
- test engineer that writes the automation code; the automation code sends requests to the browser driver component
- the browser driver component; it executes the test engineer requests; it sends its own request to the browser
- the browser; it executes the browser driver requests
So this is the analogy:
- the test engineer is like a taxi client
- the browser driver is like a taxi driver
- the browser is like a taxi
The technical explanation is not using analogies.
Like most technical explanations, there are no photos either :(
When the automation script is executed, the following steps happen:
- for each Selenium command, a HTTP request is created and sent to the browser driver
- the browser driver uses a HTTP server for getting the HTTP requests
- the HTTP server determines the steps needed for implementing the Selenium command
- the implementation steps are executed on the browser
- the execution status is sent back to the HTTP server
- the HTTP server sends the status back to the automation script
No comments:
Post a Comment