Selenium – What Is It?

Selenium – What Is It?

Selenium Locators

One of the most common technologies used throughout the world of automation is Selenium, and it’s one that you should strive to be comfortable with as it will see you far in terms of an automation career. In this mini-series, I will cover the basics of Selenium and what it is, and then go on to help you write your first Selenium test covering every step in detail along the way.

Selenium allows the automation of todays most common web browsers, allowing you to fully automate web sites and web applications. It’s a framework that includes both a record and playback tool, that allows users to create automated tests without the need for any programming or scripting languages, but it also consists of the language that we will cover in this article, Selenese, which can be used to write tests in a number of languages such as C#, Groovy, Java, Perl, PHP, Python, Ruby and Scala. And thankfully, due to the wonders of open source, we can use it free of charge, which is one of the reasons it is so widely used.

The main area that you will deal with when it comes to this technology day to day is WebDriver. This is a browser-specific driver that is able to send Selenese (the language behind Selenium) commands to the browser and retrieve results. Thankfully with modern versions of WebDriver, there is no longer a need for a specific server to run tests, now they are able to run via directly creating an instance of the browser and controlling it. This means that running tests locally is a lot less hassle and easier to setup. For remote testing, there are tools such as Selenium Grid, that works via a remote machine acting as a hub, and tests contacting the hub to obtain access to instances of the required browser.

Because Selenium and WebDriver are web based UI testing tools, as powerful as they are, they can’t be considered a single solution for automation testing. But where there is a requirement for that kind of testing, you won’t find a more powerful and more supported technology than Selenium. And it’s because of this that it’s such a sought after skill in terms of automation roles, and it’s why I want to cover it first in this technology mini series.

In the next article, you’ll learn how to create a new C# project and include Selenium and WebDriver in to your project. Before we write a very basic test covering the most common functions you’ll need to know going forward