To understand what is selenium and why do we use it, we need to understand two core software development concepts, which are, software testing and automation.

 In this article we will go through the following topics:

1)  What is software testing?

2)  What is automation in software testing?

3)  How does selenium help in software testing?

Learn selenium with Java

Learn selenium with Python

If you’ve ever developed a program which takes in input from the user and stores it in a database and uses the input to produce an output, you need to make sure that there are no errors or bugs that exist in your program. Existence of such anomalies would harm your application and cause your software to act in a way which would be unintended. Now, for a hobbyist programmer tiny bugs here and there don’t mean much but if you want to deploy your application on the internet, where it’s going to be used by millions of users, you need to make sure that everything works smoothly. And if you’re working for a corporation, you’re going to be storing large amounts of private data that belong to the clients, so there is no space for any kind of bugs since a small error can cause the company to lose large amounts of money.

So what exactly is software testing?

It’s a protocol that we follow to make sure that no bugs exist in our software. We analyze every part of the code and make sure all the bugs are taken care of. Bugs can exist at every stage of development so the earlier we catch them the better. Doing this makes sure that the same problem won’t repeat itself in the future, due to which we are not compromising on customer satisfaction. 

Why do we do it?

A company or organization can face many problems if a bug is not addressed, like loss of time or loss of work. They could also face huge financial losses and shame upon the company’s reputation, which is something they work on very hard. In cases of security bugs, the entire company’s data is under threat from hackers.

Now that we understand what is software testing, let us see how automation fits into the picture.

So what is automation in Software Testing?

Automation is where we write scripts which have an expected outcome. We then test the software and compare the expected outcome with the actual outcome that we got. If the two match that means our software is working properly and if not, it means that we have some bugs. There are plenty of automation testing tools out there which are free to use, including Selenium. Many a time, we have a lot of repetitive tasks which can take a lot of time and energy to do it manually, we can write testing scripts and automate the task. Automation can be a bigger investment but it is a one-time investment which will save you hours of manual labour and over a period be more profitable.

Another feature about automation is that the developers receive feedback instantly since computers are faster than humans as well as higher accuracy since we can iterate the same test case over and over, as much as we desire. In the end, it also gives us a defect report which is highly customized.

How does selenium help with software testing?

Selenium is a software which is widely used throughout the industry to test web application. Let us take a moment to understand what web testing is. Web testing is when we check our website to make sure all its functions are working properly, whether our security is intact and also check its performance. We also observe it’s compatibility across various devices.

A Dynamic website has a lot of functions, it has tiny web applications interacting with servers, it has many links that can lead you someplace else, it also has forms that take in input from the user and stores it in a database. When we are testing a website we may make sure that all the server are interacting correctly with the web applications, all the links mentioned in the website are real links that lead to actual locations. While testing a form, we check for mandatory fields. If a user misses out on a field that is required we are shown an error. We also test the code which was used to build the website, i.e CSS or HTML etc, inside which we search for syntax errors.

Selenium is highly robust and can be used with a large variety of languages like java, python, c++ etc, so when it comes to learning selenium one faces a huge question ‘which language should I learn selenium with?’ Our answer to that is, it doesn’t matter whether you learn selenium with Python or whether you learn selenium with Java because, at the end of the day, you’re going to be performing the same tests and get the same outcome but also it depends. 

Python is a lot easier than java since it is dynamically typed and you don’t have to mention data types while declaring a variable, neither do you require semi-colons. Also, Python has quite a few API’s which increase the power of selenium python. However, Java is a much more powerful language compared to python. If you’re writing code in java, it is very impressive to anyone who is looking for software developers. You will always have the upper hand over a python developer. Also, the selenium community with Java is much larger than that of python so if you ever need any help, finding answers in java will be significantly easier than python. But if you do choose to learn selenium with Python, use Robot which is a python framework, that can give you the same outcome as java.

Software testing is a highly sought after skill which many companies look out for. Now that you understand what it is and how to go about learning selenium, you have taken the first step towards being a professional Software Tester.