Browser Automation with Selenium WebDriver
Selenium WebDriver is a programming interface made up of different language bindings that can be used to create and execute test cases across all major programming languages, browsers, and operating systems (OS).
It was created by Simon Stewart in 2006 and it was the first cross-platform testing framework that could control the browser from the OS level. WebDriver is part of the Selenium open-source framework, and it's also a W3C recommendation from the Browser Testing and Tools Working Group.
Learn how to automate testing with codeless Selenium
How does WebDriver work?
Think of a WebDriver as a mediator, something that allows two things to interact. Imagine there are two people who cannot speak the same language. One of them has interesting and useful things to say, but can't get their point across. In that case, you need an interpreter.
Selenium WebDriver acts as such an interpreter. It allows your code to communicate with different browser drivers.
When you use Selenium to run tests, the test cases are created using element locators. You locate your elements using a Selenium element locator technique. Using WebDriver, you can then perform actions on those elements.
Selenium WebDriver benefits
There's no denying that WebDriver is one of the most popular open-source tools and it's relatively easy to get started with (providing you can code). Compared with the previous Selenium RC, WebDriver also uses more straightforward commands. Its simple architecture means that executing tests is faster.
Again, the key difference with Selenium WebDriver—as opposed to the depreciated Selenium RC—is that it interacts directly with the browser. This makes the process of automating and running tests much quicker.
WebDriver challenges
A big, and time consuming, challenge of using WebDriver is the difficulty to find out how many of your tests have failed as it doesn't have a built-in command for automating the generation of test results.
Also, while Selenium WebDriver may be simpler than previous versions, it still requires you to code, which can take months to learn.
Finally, Selenium WebDriver takes time to set up and maintain, and it requires third-party integrations to carry out many testing processes.
WebDriver alternatives
There are codeless Selenium solutions that make the build and maintenance of Selenium much simpler.
To learn more about making the most out of Selenium WebDriver, without the fuss of heavy maintenance, long build times, and resourcing issues, access our Selenium automation guide. This guide give you an extended overview of Selenium, helps you evaluate if it is the right tool for you, and search for alternatives.