Introduction to Selenium Automation Software Testing:
Selenium is a tool which is used for functional automation testing. It’s open source tool and it can be used on free of cost. In order to use this tool just go to google and download for free of cost.
This tool is mainly used for automating the applications which works on browser.
Futures of Selenium:
- Open source which means we can use it for free of cost.
- Supports multiple languages. Not like other tools where it is dependent on single language. It means that if anyone wants to use Selenium they can multiple programming languages. No dependency on singe language like other tools.
It supports below languages:
-
- Java
- C#
- Ruby
- Python
- Pearl
- PHP
- Supports Multiple Browsers: Selenium supports multiple browsers on free of cost. It supports below browsers:
- IE
- Chrome
- Firefox
- Opera
- Microsoft Edge
- Supports Multiple Operating Systems: Selenium supports most of the operating systems that are available in the market. It supports below Operating Systems:
-
- Windows
- Android
- IOS
- Unix
- Linux
- Mac
Selenium is a product which comes with 4 components in it.
Below are the components in Selenium:
- IDE (Integration Development Environment)
- RC (Remote Control Server)
- WebDriver
- Grid
Let’s try to explore each component:
IDE
- It’s just an add on to Firefox browser and works only with this browser. It is having future called record and play back. It means it records all the transactions that we do as a tester and allows playing recorded.
- Whatever actions we record it generates code on its own in HTML programming language. We generally do not write any code here but if needed we can write and as well as update too.
- It also allows to debug and set break points
- It also have an option to convert generated code to programming languages like Java, C# etc
Drawbacks of IDE:
- It only works with Firefox browser as it is add on to it
- It only supports HTML programming language
- It does not allow to import data from external source like Excel OR CSV etc
- It does not allow to support use conditions & loops
RC- Remote Control:
In simple to say all the drawbacks of IDE is nothing but futures of RC.
- It supports all the browsers not like IDE which supports only Firefox
- It also supports multiple languages not like only HTML like IDE
- It also supports multiple operating systems
Drawbacks:
- RC does not interact directly with your application and it always goes with mediator called RC
- Every line of the code will be converted to java script and then it injects java script commands to application which is time consuming
- We generally disable java scripts in case of banking domain based on client request if so, you will not be able run automation script.
- It does not support latest operating systems as well browsers too
- It does not support IOS & Android operating systems
- It is being announced that RC is deprecated which means company suggested not to use this as they are not working on it anymore if any defect found.
Best Selenium Automation Testing Online Course
WebDriver:
WebDriver is a key component of all 4 components. All drawbacks of RC are implemented in WebDriver. In simple words all the drawbacks of RC is nothing but futures of WebDriver.
Advantages:
- It is more object oriented compared to RC
- It directly interacts with your application not like RC
- Compared to RC it will be faster as it is directly interacts with application and no conversion to java script is happening here
- It also supports browser Html Unit browser as well
- Server is not required like how we use in RC
- It supports all most all the browsers and operating systems with most of the latest version as well.
Drawbacks:
- WebDriver does not have in build report generation of test cases execution
- It does not have in build support for mobile automation
- It supports only web based applications for automation
- It required to learn programming language in order to use this tool
- It requires lot of third party DLL integration in order to use few futures like reading data from Excel / CSV or report generation etc…
Grid:
Now a day’s most of the web based applications are used in mobiles and in different browsers by end users. So it is expected from testing team to test applications in multiple devices like mobile, tablet and also in different operating systems like Android, IOS etc.
So as a tester we need to make sure that system is compatible in different browsers & operating systems(we call it as compatibility testing)
Grid is the component which is mainly developed for compatibility testing and it support to test your application in different browsers and operating systems.
Grid has two things which are called “Hub” & “Node”. Let’s try to understand what is hub and node:
Let’s look at diagram which explains on Hub & Node
Hub: Is nothing but a machine in which your automation code is available. It can your laptop or can be your desktop machine. We can have only one hub but not more than that.
Node: Is nothing but a device or it can be virtual machine or it can be a another computer in which your test cases will be executed. We run scripts from Hub but your application will be executing in Node. We can have any number of nodes. We generally have nodes based on in which platform we have to test application. Let’s say client wanted us to test application in browsers Chrome, IE & Windows, IOS & Android operating systems. So we can have 3 nodes here one for Windows, one for IOS & another one for Android operating systems respectively.
Best Selenium Automation Testing Online Course
Conclusion: In this chapter 1 we learned about selenium tool and it’s components. Here is the summary:
- Selenium is an open source functional automation tool
- Selenium suite comes with 4 components
- IDE
- RC
- WebDriver
- Grid
- Selenium is an functional automation testing tool and it can be used for automating the manual test cases
- Selenium tool supports multiple browsers & operating systems
- RC is deprecated due to its drawbacks
- WebDriver is core component of Selenium suite and it is the core component of the selenium
- With the help of Grid we can run test cases parallel in different browsers and operating systems
- We also talked about drawbacks for WebDriver, RC and IDE as well.
Have a look at our Trainer Profile.