Skip to main content

Introduction to selenium

What is Selenium?

Selenium is a web Automation tool which can used to perform testing ONLY on Web Applications. not Windows based applications.
There are others tool which can be used to automate both web applications and windows applications like QTP (Quick Test Professional) . As every one aware that QTP is Licensed Tool AND Selenium is Open source tool, download it configure it and enjoy.
This is the main reason why most of the companies choose Selenium whenever they want to automate Web applications
It has the below components:
Selenium IDE: Which is a firefox plug-in which deals with and playback mechanism. User can create simple scripts and export to selenium RC or Webdriver.
Selenium RC: Is a tool which allows to automate web application using any of the programming language that supports.
Selenium Webdriver:
It makes direct calls to the browser using each browser's native support for automation.
Webdriver was developed to better support dynamic web pages like Ajax where elements of a page may change without the page itself being reloaded.
Selenium Grid:
Is a server that allows tests to use web browser instances running on remote machines.
There are others tool which can be used to automate both web applications and windows applications like QTP (Quick Test Professional) . As every one aware that QTP is Licensed Tool AND Selenium is Open source tool, download it configure it and enjoy.
This is the main reason why most of the companies choose Selenium tool whenever they want to automate Web applications
As a beginner, if you want to learn selenium, it is not that difficult, you just start using Selenium IDE which is a firefox plug-in, used to record and play the script. This is just for practice, and you can learn how the commands that are used to run the script in IDE.
But remember IDE itself is not enough for effective test case writing / scripting. Because it doesn't support looping concepts and and you cannot customize it for your needs.
At this point of time, you can start using Webdriver with the programming language that you are comfortable with.
We prefer Java as it is from long time in the industry and there are many online forums which provides support to Webdriver with Java.

How and where to download selenium?

It is very simple to download selenium. We need to download a jar file from Selenium Downloads. In the downloads page, you will find the name as Selenium server, where you will have a link to download the latest version of selenium.
And at Selenium Client & Webdriver Language Bindings, You need to choose the language that you are going to use to write the selenium scripts. The current version of selenium is 2.39.0 ( At the time of writing).
Be sure you specify the most current version as there will be some enhancements and fixes will be added/appended. You can also refer to change log document for reference.
the downloaded file name will be selenium-server-standalone

Prerequisites to learn selenium?

Before jumping into selenium, user should be aware of basic java concepts and HTML concepts which will help the selenium developer to create effective scripts.
HTML knowledge: User should have knowledge in basics of HTML tags like text-box, text-area box, radio buttons check-boxes and the tags for these elements etc.
we will discuss in detail in HTML introduction
Java knowledge for Selenium: User need to have minimum knowledge in the below concepts:
  • Static and Non Static Variables
  • Control statements
  • Operators
  • Objects and Classes
  • Return Types
  • OOPS concepts (Inheritance, Overriding)
  • Strings
  • Constructors
  • Arrays
  • Exception Handling
  • Packages
If the user is really strong in the above concepts, he/she can play with selenium with minimum effort.
A user without these concepts also can start scripting, but need to work hard to write effective test scripts using selenium.

Comments

Popular posts from this blog

JMeter Exceeded Maximum Number of Redirects Error Solution

While running performance test, JMeter allows maximum 5 redirects by default. However, if your system demands more than 5 redirects, it may result in JMeter exceeded maximum number of redirects error. In this post, we have listed down steps to overcome this error. Actual error in JMeter: Response code: “Non HTTP response code: java.io.IOException” Response message: “Non HTTP response message: Exceeded maximum number of redirects: 5” This error is noticed because  JMeter  allows maximum 5 redirects by default and your system may be using more than 5 redirects. You need to increase this count to more than 5 in jmeter.properties file. Follow below steps to achieve this. Navigate to /bin directory of your JMeter installation. Locate jmeter.properties file and open it in any editor. Search for “httpsampler.max_redirects” property in opened file. Uncomment the above property by removing # before it. Change to value to more than 5 Eg. 20. Save the file and restart JMet...

SSO with SAML login scenario in JMeter

SAML(Security Assertion Markup Language) is increasingly being used to perform single sign-on(SSO) operations. As WikiPedia puts it, SAML is an XML-based open standard data format for exchanging authentication and authorization data between parties, in particular, between an identity provider and a service provider. With the rise in use of SAML in web applications, we may need to handle this in JMeter. This step-by-step tutorial shows SAML JMeter scenario to perform login operation. First request from JMeter is a GET request to fetch Login page. We need to fetch two values ‘SAMLRequest’ and ‘RelayState’ from the Login page response data. We can do this by using  Regular Expression Extractor . These two values need to be sent in POST request to service provider. Refer below image to see how to do this. We will get an HTML login page as a response to the request sent in 1st step. We need to fetch values of some hidden elements to pass it in the next request. We...

VBScript Code - Function to convert CSV file into excel and viceversa in QTP using VBScript

We at times are required to convert excel files into csv to read as flat files and sometime require to convert a csv file into excel file to use excel features on the data.   Below function shows how to convert an csv file into excel file and vice versa. We can also convert to other formats based on constants Here constant value 23 is used to create a csv file and constant -4143 to save a file as xls file. Once the destination file is created, we can delete the source file as shown below.  In case of any issue in understanding the code, please add in comment section Call func_ConversionCSVExcel("E:\Test.csv", "E:\Test_converted.xls", "csvtoexcel") Public Function func_ConversionCSVExcel(strSrcFile, strDestFile, Conversion) on error resume next Set objExcel = CreateObject("Excel.application") set objExcelBook = objExcel.Workbooks.Open(strSrcFile) objExcel.application.visible=false objExcel.application.displayalerts=...