Software Automation Testing Internship Progra ...
- 1k Enrolled Learners
- Weekend/Weekday
- Live Class
Do you know what is Selenium? Do you have any idea why it is used? If you want the answer to these two questions, then wait until you read the entire content of this blog because you will be glad you spent a worthy amount of time getting an introduction to what could be at the heart of your next job role.
Automation testing is taking the world by storm & Selenium certification course is one of the most sought-after skills in the industry.
Manual testing was tedious and boring for Jason Huggins, an engineer at ThoughtWorks in Chicago. He created JavaScriptTestRunner, a JavaScript program that automates web application testing.
Thoughtworks employees were the first to use the new invention. However, it was renamed Selenium and made open source in 2004. Selenium has been a powerful automation testing tool for testing various web applications across various platforms since its inception.
Let us now learn about Selenium.
Selenium is an open-source tool that is used for automating the tests carried out on web browsers (Web applications are tested using any web browser).
The WebDriver is the core component of Selenium, acting as a bridge between your code and the web browser, allowing you to control the browser and interact with web elements. Selenium works with a variety of browsers, including Chrome, Firefox, Safari, and Edge.Selenium is widely used for quality assurance in the software industry, particularly in web application testing. It has become a standard tool for web developers and testers working on projects.
Wait, before you get carried away, let me re-iterate that, only testing of web applications is possible with Selenium. We can neither test any desktop (software) application nor test any mobile application using Selenium.
It’ a bummer right? I can feel your pain. But don’t worry, there are many tools for testing software and mobile applications like: IBM’s RFT, HP’s QPT, Appium and many more. But, the focus of this blog is, testing dynamic web applications and why Selenium is the best for that purpose.
Since Selenium is open-source, there is no licensing cost involved, which is a major advantage over other testing tools. Other reasons behind Selenium’s ever growing popularity are:
Selenium has a few flaws, which can include:
But there surely has to be shortcomings right?
Before going any further in this what is Selenium blog, you ought to know the story behind how Selenium came into being what it is today. So, let’s understand the scenario in the below order:
Software testing is where it all boils down to. Today’s world of technology is completely dominated by machines, and their behavior is controlled by the software powering it. Will the machines behave exactly as we want them to? Everytime? Everywhere? The answer to these questions lie in software testing.
At the end of the day, it is the software application’s success rate which is going to control your business growth. The same thing can be said even for web applications because most businesses today are completely reliant on the internet.
Take for example, any e-commerce company. Be it Amazon or E-Bay or Flipkart, they rely on the customer traffic on their web sites and traffic on their web based mobile applications for business.
Imagine, if something catastrophic happens like the prices of a number of products being capped off at 10$, all because of a small bug in a “not so easily readable” part of the code. Then what can be done, and how can we prevent it the next time?
By testing the code before deployment right? So, that is the need for software testing. But, what is Selenium? Is it a software testing tool? Well, Selenium is an automation testing tool!
Related Article: Software Testing Interview Questions
Before I go any further, let me clear out that, Software testing is of two types: Manual Testing & Automation Testing. Selenium was founded as an automation testing tool to overcome the drawbacks/ limitations of Manual testing. So, in the next section of this what is selenium blog, let’s understand the challenges with manual testing.
Find out our Automation Testing Course in Top Cities/Countries
India | USA | Other Cities/Countries |
Bangalore | New York | UK |
Hyderabad | Chicago | London |
Pune | Dallas | Canada |
Chennai | Atlanta | Australia |
Charlotte | Singapore | |
Washington | UAE |
Manual testing means the (web) application is tested manually by QA testers. Tests need to be performed manually in every environment, using a different data set and the success/ failure rate of every transaction should be recorded.
Look at the above image of a poor chap, who manually verifies the transactions recorded. The challenges he is facing cause fatigue, boredom, delay in work, mistakes and errors because of manual effort. This lead to the invention of Selenium (automation testing tool).
Related Article: Manual Testing Interview Questions
Automation testing beats manual testing every time. Why? Because it is faster, needs less investment in human resource, it is not prone to errors, frequent execution of tests is possible, supports lights out execution, supports regression testing and also functional testing.
Let’s take a similar example to the one mentioned earlier. Suppose there is a login page and we need to verify if all the login attempts are successful, then it will be really easy to write a piece of code which will validate if all the transaction/ login attempts are a success or not (automated test case execution).
Moreover, these tests can be configured in such a way that they are tested in different environments and web browsers. What else can be done? You can automate the generation of result file, by scheduling it for a particular time during the day. Then you can also automate the generation of reports based on those results and what not.
The key point is that automation testing makes a tester’s job a whole lot simpler. Check out the image below which shows a more relaxed environment in which the same tester is working.
Now, let me talk about Selenium in particular.
Now let us see where Selenium stands in the market.
I have compared its performance with two other popular tools: QTP and RFT in the table below.
Features | HP QTP | IBM RFT | Selenium |
License | Required | Required | Open-source |
Cost | High | High | Open-source software |
Customer Support | Dedicated HP support | Dedicated IBM support | Open-source Community |
Hardware consumption during script execution | High | High | Low |
Coding experience | Not required | Required | Ample amount of coding skills and experience needed |
Environment support | Only for Windows | Only for Windows | Windows, Linux, Solaris OS X (If browser & JVM or JavaScript support exists) |
Language Support | VB Script | Java and C# | Java, C#, Ruby, Python, Perl, PHP and JavaScript |
It is pretty clear from the above table why Selenium is the most preferred tool. But there are many flavors in Selenium and you should know which is the appropriate right Selenium tool for your need.
Below I have explained each of the components of the Selenium in detail:
Before I talk about the details of Selenium RC, I would like to go a step back and talk about the first tool in the Selenium project. Selenium Core was the first tool. But, Selenium Core hit a roadblock in terms of cross-domain testing because of the same-origin policy. The same-origin policy prohibits JavaScript code from accessing web elements that are hosted on a different domain compared to where the JavaScript was launched.
To overcome the same-origin policy issue, testers needed to install local copies of both Selenium Core (a JavaScript program) and the webserver containing the web application being tested so they would belong to the same domain. This lead to the birth of Selenium RC, which is accredited to then ThoughtWork’s engineer, Paul Hammant.
Tool | Why Choose? |
Selenium IDE |
|
Selenium RC |
|
WebDriver |
|
Selenium Grid |
|
RC overcame the problem by involving an HTTP proxy server to “trick” the browser into believing that Selenium Core and the web application being tested come from the same domain. Thus making RC a two-component tool.
RC Server communicates using simple HTTP GET/ POST requests. Look at the below image for understanding the RC architecture.
Selenium project’s flagship tool was Selenium RC as it was their first tool and it could be used to write test cases in different programming languages. But the drawback with RC is that every communication with the RC server is time consuming and hence RC is very slow. So slow, that it would sometimes take hours to complete single tests.
From Selenium v3 onwards, RC has been depreciated and moved to legacy package. You can however download and work with RC, but unfortunately you cannot avail support for it. But on the flip side, why would you want to use a tool which is outdated, especially when there is a more efficient tool called Selenium WebDriver. Before I talk about WebDriver, let me discuss about IDE and Grid, which are the other tools that make up Selenium v1.
Related Article: Selenium Interview Questions
In 2006, Shinya Kastani from Japan had donated his Selenium IDE prototype to Apache’s Selenium project. It was a Firefox plugin for faster creation of test cases. IDE implemented a record and playback model wherein, test cases are created by recording the interactions which the user had with the web browser. These tests can then be played back any number of times.
The advantage with Selenium IDE is that, tests recorded via the plugin can be exported in different programming languages like: Java, Ruby, Python etc. Check out the below screenshot of Firefox’s IDE plugin.
But the associated shortcomings of IDE are:
These were some of the aspects of Selenium IDE. Let me now talk about Selenium Grid.
Selenium Grid was developed by Patrick Lightbody and initially called HostedQA (initially a part of Selenium v1) and it was used in combination with RC to run tests on remote machines. In fact, with Grid, multiple test scripts can be executed at the same time on multiple machines.
Parallel execution is achieved with the help of Hub-Node architecture. One machine will assume the role of Hub and the others will be the Nodes. Hub controls the test scripts running on various browsers inside various operating systems. Test scripts being executed on different Nodes can be written in different programming languages.
Grid is still in use and works with both WebDriver and RC. However, maintaining a grid with all required browsers and operating systems is a challenge. For this, there are multiple online platforms that provide an online Selenium Grid that you can access to run your selenium automation scripts. For example, you can use LambdaTest. It has more than 2000 browser environments over which you can run your tests and truly automate cross-browser testing.
Founded by Simon Stewart in 2006, Selenium WebDriver was the first cross-platform testing framework that could control the browser from OS level. In contrast to IDE, Selenium WebDriver provides a programming interface to create and execute test cases. Test cases are written such that, web elements on web pages are identified and then actions are performed on those elements.
WebDriver is an upgrade to RC because it is much faster. It is faster because it makes direct calls to the browser. RC on the other hand needs an RC server to interact with the web browser. Each browser has its own driver on which the application runs. The different WebDrivers are:
Learn how to handle multiple windows in Selenium here.
No matter the challenge, these shortcomings can be overcome by integrations with other frameworks. For testing images, Sikuli can be used, and for generating detailed test reports, TestNG can be used.
Find out our Selenium Training in Top Cities/Countries
India | Other Cities/Countries |
Bangalore | US |
Hyderabad | UK |
Pune | Canada |
Chennai | Australia |
Mumbai | Singapore |
Kolkata | Edinburgh |
So that draws the conclusion to this blog on what Selenium is. To learn more about Selenium WebDriver and TestNG, read the other blogs in this Selenium tutorial blog series. You can alternatively see the video below delivered by an industry expert where she has shared her opinion of Selenium as an automation testing tool.
This ‘what is selenium’ blog is the first in the Selenium tutorial blog series. Stay tuned to Edureka’s blog site for more blogs on Selenium.
For details, You can even check out in-depth knowledge of various functionalities of JMeter which are used to evaluate the performance of the application with the Performance testing course.
If you wish to learn Selenium and build a career in the testing domain, then check out our interactive, live-online Selenium Training in, which comes with 24*7 support to guide you throughout your learning period.
Got a question for us? Please mention it in the comments section of this What is Selenium article and we will get back to you or join our course today.
Course Name | Date | Details |
---|---|---|
Selenium Certification Training Course | Class Starts on 14th September,2024 14th September SAT&SUN (Weekend Batch) | View Details |
Selenium Certification Training Course | Class Starts on 23rd September,2024 23rd September MON-FRI (Weekday Batch) | View Details |
edureka.co
thank you for shearing such useful information it will definetly help me in my project which is based on selenium certification and training.
hi folks…I just started lean selenium
Great information and pretty good for any beginner or intermediate student of the selenium. Keep Sharing
good explanation
grate blog ,each and every line having different meaning.
https://www.exltech.in/software-testing-course.html
try out https://softwaretesting.ai to run Selenium tests headlessly without coding skils (it can be used for free)
hi, nice information is given in this blog. Thanks for sharing this type of information, it is so useful for me. nice work keep it up.
for more info visit us on : http://www.supreetsolutions.com/
This is a great fundamental note on Selenium and how to get started with it. Selenium brings convenience and adaptability, as it provides mechanisms to allow the same tool to run across multiple platforms. As mentioned
above, it supports almost all Operating Systems, namely, Windows, Linux, and Mac and operates across popularly used browsers like Firefox, Microsoft, Internet Explorer, and Safari. So, Selenium becomes the tool of choice for
cross browser/cross platform validation.
You might like to check out this post ‘How to Add Visual Testing to Existing Selenium Tests’… please do share your views… https://www.cigniti.com/blog/add-visual-testing-to-existing-selenium-tests/
Hi…I would i select a date from calender in selenium?
Looking to Build a framework of Selenium automation tool using C#. Automation tool should be able to execute test cases for all major browsers, Android devices, iOS devices.
Should be able to collect logs, end result report and screenshots. And send email to team after execution. Later we would like to connect it to database and other 3 party component.
I am just giving you an example to build automation tool for this site : http://www.simplesite.com/
Now I would like to know how much would that be from side
(just consider above example) and how long would be taken from your side to deliver it ??
You may find FinesSE interesting, it is a synergy of Selenium and FitNesse written in C#. It has several features you mentioned already.
https://github.com/MirekVales/FinesSE
Hey @slavekvales:disqus Thank you for reading our blog and sharing your thoughts. Keep learning and keep growing :)