Automating a Browser! Selenium is the tool used for automating browsers. You’ll come to know the following in this beginner’s tutorial on Selenium with Python:
What is Selenium?
Let us begin. So selenium is a set of libraries that help us automate web browser actions. When you go to your browser and type selenium, you will get one of the options as seleniumhq.org and this is the official website of selenium. When you go there you will see the very first line says Selenium automates browsers. That’s it! And once you get the power to automate a browser, the things you can do with it are actually unlimited.
So let us take a very simple example, you want to test a login page. So you will enter the username enter the password and click on the login button. Now, if you want to automate this testing, you will download the selenium libraries in any of your preferred programming languages, and using these libraries You will create your test script. So the next time you want to test this login page, you will call these test scripts and it will do all the actions for you.
So at a very high level, you will be doing three things with selenium. The first thing is you will identify the web elements like text boxes dropdowns and buttons on the web page where you want to work. Then you will add the actions in your preferred programming language along with the test data. Thirdly you will run your test and validate.
Features of Selenium:
So selenium is free and open-source, and it is the most popular solution for the automation of web applications. Let us look at some of the features of selenium.
- So selenium is flexible and extensible.
- It has support for multiple languages and browsers.
- If you go to the selenium site and you go to download. After then go down, you will find a lot of third-party plugins and add-ons available for selenium. There are a lot of plugins available so you can extend selenium. So you can get a lot of functionalities in selenium.
Components of Selenium
Let us look at the four major components of selenium. We have selenium IDE, selenium RC or remote control, Webdriver, and selenium grid.
Selenium IDE is an add-on for Firefox and it is a recording playback plug-in and you can use it for prototype testing.
Selenium Webdriver is the most actively used component today for Frameworks. It is an API, which is used to interact directly with the browser and is also known as selenium 2 now.
Selenium grid provides us the capabilities to run our tests parallelly across different machines. So whenever you want to minimize the execution time, or you want to run your test cases on multiple Platforms in browsers, you can use selenium Grid.
So in selenium, these are the four major components Selenium IDE recording playback plug-in for Firefox, selenium RC known as selenium one and not actively supported, Selenium Webdriver, and then Selenium Grid.
So these are the four major components You can also go to the selenium site and go to the project sections. Where you will find details about these four components.
Let us also very quickly look at the key people who started selenium. So Jason Huggins started selenium in 2004, during his internal project. He wanted to create a testing suite and he started working on these selenium scripts. Then Shinya cassette of Japan created the Selenium IDE, Selenium RC the key person was Paul Hammant, and Simon’s Stewart was the key person in selenium Webdriver, and Selenium Great the major contributor was Patrick Lightbody.
So selenium RC is no longer supported and is deprecated and selenium RC and Webdriver are merged to form selenium 2. We also have selenium 3 now released in October 2016. If you go to your browser and type selenium releases. You will get the official selenium blog for the releases. There you will see this blog about selenium 3.0. So selenium 3 is out now and selenium RC is no longer supported. You will also not find a link to download selenium RC with selenium 3. So what they have done is all the RC implementation is replaced with Webdriver compatible components. So if you want to have selenium RC, you have to go to the previous releases.
Let us look at what are the browsers that selenium supports. So selenium supports all the major browsers. Also, there are many more browsers that selenium can support which you can check on the download page. If you go down further, You can find there are a lot of other browsers that support it by third-party plugins. Visit the official page of selenium: seleniumhq.org and you can see all these browsers. When you visit this link you can find a lot of browsers and their versions that support selenium, in detail.
OS & language Supported
When we talk about operating systems, it supports all the major operating systems. Then again we have others as well. So for this also you can go to this particular link, and go to the operating systems. You will find all the operating systems supported by selenium. When we talk about languages selenium provides us support in all the major languages whether it is Java Perl PHP, c-sharp, python, or Ruby. Moreover, you can find other details on the official site of selenium and then on the about platforms page. So if you go to this platforms page, you will find all the languages supported and you will also find information about the framework supported in each language. So if you are using Java you have Frameworks available Like J unit and test NG for test management and so on.
So for today, if you are a beginner in selenium, you should go to the seleniumhq.org website > documentation and introduction and read about it. So if you go to the seleniumhq.org website you have a link for documentation here Just click here. If you are a beginner, I suggest that you should go there and read about this introduction of selenium. I hope we are now very clear with the concepts of selenium. So we know what selenium is the features and the components of selenium and the browser’s OS and language supported by selenium. Thanks for reading.