What is Selenium?
What is selenium? Selenium is an open-source automation testing tool. It automates only web applications. Open source means, it is freely available in the market, no paid license is needed to use it. It is available as an API(Jar Files). It supports only web applications, not supports desktop applications like Skype, etc. It is very lightweight. It also supports the following browsers
1) Firefox
2) Chrome
3) Safari
4) Opera
5) IE
2) Chrome
3) Safari
4) Opera
5) IE
It has four major components.
1) Selenium IDE: A record and play component. It is available as a Firefox Add-On and as a Chrome Extension. It is used for recording, editing, and debugging of functional tests. It was previously known as Selenium Recorder.
2) Selenium RC: Selenium RC is a tool that allows you to write automated web application tests in any programming language. It has two parts (Remote Server & Client Library) . The remote server acts as a middle man between the client and the web browser. It is deprecated from the market.
3) Selenium WebDriver: WebDriver is also a web automation testing tool. It is an advanced version of Selenium RC. In Selenium WeDriver we don't need a Remote Server. In Selenium WebDriver client directly communicates to the browser. It is much faster than Selenium RC. Following programming languages are supported by WebDriver
1) Java
2) JavaScript
3) DotNet
4) PHP
5) Python
6) Perl
7) Ruby
2) JavaScript
3) DotNet
4) PHP
5) Python
6) Perl
7) Ruby
4) Selenium Grid: By using Selenium-Grid we can run tests on different machines against different browsers in parallel. Multiple tests are executed at the same time against different machines running different browsers and operating systems. It is used for distributed test execution.
In this session, I will let you know to configure selenium with eclipse. How to add jar files into your project. Selenium with java is the best combination. So I will prefer to use java with Selenium.
Download Selenium Client from here Selenium Client and extract it. We will include these Jar files into Project. Then we can write a Selenium Command to automate any test case.
1) Launch eclipse and Go to File -> New -> Java Project
2) Write the name of the project and click on the Finish button
3) Now right click on Project and click on last option "Properties"
4) A popup window will show
5) Click on Java BuildPath
6) A new popup window will show
7) Click on "Add External Jar" button
8) Now select the jar files and click OK button
9) Again click on "Add External Jar" button
10) Select all the jar files inside the lib folder and click OK button
11) Now click on "Apply and Close" button
12) You will see all jars have been added successfully to project
The above steps are showing the basic configuration of selenium with eclipse. Please practice this session, it is important to learn this session, because after this configuration you will be able to write a script in selenium. And in the next session, I will let you know how to launch a chrome driver, Firefox(GeckoDriver). Also, we will write a basic script in selenium.
Cheers!!!! :)
0 comments:
Post a Comment