Selenium Webdriver Introduction will discuss about brief information about selenium webdriver. As per the official site, Selenium automates browsers. That’s it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that.
Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.
- Selenium IDE
- Selenium RC
- Selenium Web Driver
- Selenium Grid
The Selenium-IDE (Integrated Development Environment) is the tool you use to develop your Selenium test cases. It’s an easy-to-use Firefox plug-in and is generally the most efficient way to develop test cases. It also contains a context menu that allows you to first select a UI element from the browser’s currently displayed page and then select from a list of Selenium commands with parameters pre-defined according to the context of the selected UI element. This is not only a time-saver, but also an excellent way of learning Selenium script syntax.
This is obsolete from Selenium 3.
Selenium Web Driver:
Selenium-WebDriver makes direct calls to the browser using each browser’s native support for automation. How these direct calls are made, and the features they support depends on the browser you are using.
Selenium-Grid allows you run your tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems. Essentially, Selenium-Grid support distributed test execution. It allows for running your tests in a distributed test execution environment.
Features/Advantages of Selenium:
1.It is an Open Source Tool.
No need to pay anything to anybody to use this tool. So, no cost involved to use this tool to automate the applications. It is one of the biggest advantages compare to licensed tools.
Just download it from their official site and start using it … 🙂
2. It Supports Multiple Browsers:
It has the capability to execute the same script across multiple browsers.
Ex: Firefox, Chrome, Opera and Edge etc.
So we can do browser compatibility testing.
3. It Supports Multiple Operating Systems:
It has the capability to execute the same script across multiple Operating Systems.
Ex: Mac, Windows, Linux and Ubuntu
So we can do OS compatibility testing.
4. It Supports Multiple Languages:
It supports multiple languages to write the scripts. So, you can choose which language is comfort for you.
5. Parallel Execution:
It has the capability to execute the same script in Parallel. Means, can execute the scripts in parallel in same browser or different browsers at a time. So we can do browser compatibility testing in parallel. This reduces the execution time. For this we can use TestNG or Selenium Grid.
6. Support On Web:
Can get much support on Internet.
- Online Tutorials
- Online Forums
- Facebook groups
- YouTube Videos
7. Support From Selenium:
Can get much support From Selenium.
- They will not give support for individual customers.
- But you can post the issues; then they will correct them and release as a new version.
8. Integration with Other tools:
Can Integrate with so many tools.
- Depends on the language you use.
- Can integrate with Continuous Integration tools.
- Can Integrate with Reporting tools.
- Can Integrate with Unit Test Frameworks.
- Can Integrate with Build tools.
Ex: Maven, Ant, SVN, TestNG, NUnit and JUnit etc.
10. It Simulates Human Actions:
Selenium Web Driver simulates the human actions.
- How a human interacts with the application, same way webdriver also interacts with the browser(i.e. web application).
11. Can minimize the browser while executing and we can do our own work.
12. It supports so many IDEs (famous is Eclipse for Java and Visual Studio for C#).
13. We can customize the selenium code if we have the programming skills.
Limitations/Disadvantages of Selenium:
1. Automates Only Browsers:
It automate only browsers means it automate only web based applications. It can not automate window based applications.
Now a days people are using almost web based applications only.
2. Need to have Bit Programming Skills:
Need to know bit programming knowledge to automate the applications using Selenium Webdriver.
But we have a provision that, we can use which is language comfortable for us.
3. No In Built Object Repository:
Selenium does not have in built object repository to store locators. So, maintaining/capturing locators will be bit time taking process.
But we have a provision that, we have so many options like excel sheet, properties file and xml file etc.
4. No In Built Report Generation:
Selenium does not have any in built report generation capability like licensed tools.
But we can generate reports using some third party tools/plugins like Extent Reports, Vigo Reports, TestNG, ReportNg and XSLT etc.
5. File Upload is Bit complicated:
We can not upload the files using Selenium. But we have some alternatives.
We can integrate with some third party tools to achieve this functionality.
6. Image Comparison is not possible:
We can not automate image comparison functionality using selenium web driver.
But we can use programming knowledge/skills to achieve this functionality.
7. Captcha and Bar Code Readers can not be automated:
We can not automate Captcha and Barcode readers using Selenium Web Driver.
8. Recovery Scenario is not Available:
In built recovery scenario is NOT available.
Need to write our own logic to achieve this functionality.
9. Concern about Security:
Some clients concern about security as it is open source tool.
- Basic Coding Knowledge.
- Basic HTML Knowledge.
Please watch youtube video for better understanding.