From the course: Learning Selenium

Using WebDriver - Selenium Tutorial

From the course: Learning Selenium

Start my 1-month free trial

Using WebDriver

- [Instructor] This chapter is all about understanding how to use Selenium WebDriver. I will cover how it works under the hood, as well as how to write and run tests with WebDriver. The goals of WebDriver are to help developers and testers quickly and easily write automated tests, also, to maintain a standardized API that is friendly to use and emulates user actions, such as clicking and typing. This helps to make test writing with WebDriver very straightforward. Automating tests with WebDriver are a huge benefit for testers, as it allows them to spend less time doing manual verification. It's also great for developers who can move quickly and have confidence in tests to know they are not introducing regressions. WebDriver is the perfect option for those who have a need to test their application across multiple browsers and platforms. There is a lot of customization to use the WebDriver API, which makes it a very powerful testing framework. If you need to automate web tests, WebDriver is definitely the way to go. Selenium WebDriver works using client server communication. When a Selenium test is executed, a new session of the browser driver is created and a browser is launched. For each command in the test script, a request is sent to the WebDriver API. The WebDriver API interprets the request and the step is then executed in the browser driver, which acts as the server and just waits for the request to come in. Once each step is complete, the response is sent back to the WebDriver API and then back to the test. This process continues until all steps are complete. WebDriver works with all major supported text stacks. The languages supported are C, Java, Ruby, Python, and JavaScript. The platforms supported are macOS, Windows, and Linux. And the browsers supported are Chrome, Firefox, Internet Explorer, and Safari. Each one of these browsers has their own driver, which are maintained by a different browser vendor. The key idea behind these drivers is that they are written in a language most natural to use for each browser. All the drivers are built with the idea that as much as possible should be done in the best fit language. The implementation that users see is a thin wrapper around this, which makes it really easy to use the bindings without knowing how the code is working under the hood.

Contents