Wednesday, 29 March 2017

Selenium Automation

Think you are sitting with a coffee in your hand and all the work you have to do is happening automatically. You just have to Observe ! Sounds Crazy !! Ryt?? 😉😊
But yes it Can Happen For real. You just have to be aware of the Technology used to achieve that. YES !! I am talking about Automation. Things will happen for Itself !!

"Voila sounds Great ! I don't have to work now !! its magic ! Ha ! "

Well that's not magic it's we who create it so that things will happen for itself in Real Time. So that we are more Productive, less error prone, more accurate and eliminating the need of doing repetitive task. Sounds Interesting ! huh !!

There are many automation Technologies Existing as if now.Possibly you might have heard of some. From now on in this blog series I am gonna talk about Selenium WebDriver.

This Would be my first Blog post Ever. So please pardon me for any of my mistakes ahead. Before Starting the journey with Selenium Automation I would first Like to tell you guys something about myself.

I am a Professional Software Engineer(SDET) and its been more than 1 year that I have been working on the Selenium and other different automation technologies. Now being having quite Experience with the Selenium i think it's the right time to share my knowledge and the challenges I have faced while starting out my journey with Automation. one of the most appropriate things to say here that is
With this Great Thought I would like to start this first session where I will be Discussing About the Prerequisites at minimum required to start off with Selenium.After that I will be Covering the Details that how you are going to Setup Your Laptop/PC to start making your hands Dirty. If you are Completely New to Selenium and  have no prior Experience on Selenium then this is a must read for you Else if you are Already Done With the Installation part Then you can skip this Read.

Prerequisites :-
  • The Only Prerequisite Required to start with selenium is Basic Knowledge of JAVA. As selenium is Completely Based on JAVA Language so it's a must to have some Basic Background of Java.
  • You don't have to be an expert in Java , the only thing Required is Basic Knowledge Covering OOPs Concepts, Methodologies Like Classes, Objects, Methods ,  and some Hands On on Making some of the Basic Programs. The Information regarding the Programs you need to Practice can be Taken from any 12th Class Course Books of Java in ICSE board or there will be plenty on internet.
  • Although While Walking in this Journey Ahead, I will also be Covering the Concepts of Java Wherever Required, Still if you have Prior basic Background it will help you to Catch up with the things Easily.
Selenium Introduction

Selenium :- Selenium is a Web Based Automation Tool for Automating the Websites. In Layman Language it's a Technology which will reduce the Manual Interaction of the User with the Website.
Things will be done Automatically without the Human Intervention. Of Course You will have to Code in Java Using the selenium Automation Jar files but no need to be an expert in java 😊 .
The Beauty of selenium is it's an Open Source Technology and requires no license to install and Start using it. This feature of Selenium can also be termed as the one of the many reasons for the popularity of this tool.
Well, while starting to learn any of the technology its a must to know about its background, from where it's originated and how it's come into picture and who was the one who developed it. Well there is no one person there are many. But I believe these are important for Knowing the Background at the same time you might end up to be bored soon...., so may be you want to read this while you are not really learning or interested in knowing the Development on. You can go through the history and Other Basic Concepts Here.

Starting with the First Step in the Stage of Learning Selenium : -

Setting Up Selenium in Your PC/Laptop :
There is Many Times Confusion as to what are tools and software required for Using the Selenium. Here is the List of tools and Software required to be Installed in your PC before you can start Using the Selenium : -
  • Eclipse IDE (Here is the link to get software) It's an Open Source IDE which can be downloaded from the Link Provided Above.
  • After the Eclipse is Successfully Downloaded, there will be  zip file , extract that zip file and open the folder. It will look something like below -

The Eclipse Icon which is visible above is the main Application. Double Click on the Icon and Eclipse will Start. While Loading there will be a Dialog box as shown Below, you need to select the Work Space where you will be going to Save all your future Projects you will be Creating in Eclipse.

Click on Browse and select any Particular Location in your PC and Click on OK. The Eclipse Will Load up and following is the First Screen you will see -

Eclipse has been successfully loaded into you PC. Now It's Time to Get the Selenium Stuff so that we can start hands on selenium. For Using Selenium with selenium you have to Download the Jar file form the Internet. Click on this Link and download the Latest file into your PC. On Clicking the Link Above You will see the following Screen -

Go to the "Selenium Client & Web Driver Language Bindings" and Click on Download for the Language "JAVA". Time to Grab a Coffee :) . It will take few Minutes to download and after the Download is Completed there will be a Zip file. Extract that Zip File and You will Get the Folder of Selenium Containing the Selenium Jar Files. Now Goto Eclipse And Click on File >> New >> Project.

Select "Java Project" and then click on "Next". After Clicking on the Next another Window will be Displayed as Shown Below,

Enter the Project Name and tick the "Use Default Location Box" (Default Location -- Workspace we have selected while Opening the Eclipse). Now click on "Finish Button".
After Clicking on the Finish button you will see the project created in the eclipse as shown below ,


Congrats ! you have successfully Created the Selenium Project. Now we will configure our selenium Project to have the Selenium JARS so that we can code in selenium. Now, Right Click on the Project and Click on Properties,

following Screen Will Appear,

Click on Add External Jars and Go to the location where selenium folder is extracted,

On entering the Folder Select both the Jar files and Click on Open,


Enter the Library Folder and Select all the Jar files inside the folder and Click on Open Button,

Click on OK ,


After Performing all the Steps Above you will see the Project as shown below. You have successfully added the Selenium Jar files to the Project.

So, till now We have gone through the basic introduction of Selenium and have learned what Software are needed to be installed and moreover how to configure those to start Coding in Selenium.
This is all for now in this Tutorial. See you guys in the next posts where we will be starting  coding in selenium and will start digging inside the basics.
Happy learning 😊
Please do share your thoughts on this and any questions you may have in the comments below. Will try to answer as soon as possible.