Skip to main content

Posts

Showing posts from February, 2018

Launching Browser

To begin with our first code, let's organize our packages to make it better for viewing and understanding In eclipse every folder is known as Package Points to noted : 1) Package name starts with lower case 2) Class name Starts with upper case Let's create a package Let's create a Java Class Let's launch all browsers one by one: Chrome FireFox InternetExplorer

Adding drivers to launch browser..

Selenium cannot directly interact with browser. This can be achieved by using the respective browser diver. Download the required drivers: http://docs.seleniumhq.org/download/ All the drivers links are available in the selenium official website. Here, in this tutorial I'll demonstrate to launch Chrome (ChromeDriver) Chrome Driver Link Gecko (FirefoxDriver) Gecko - FireFox Driver Internet Explorer (IEDriverServer) IEDriverServer You can similarly find drivers for Opera, Edge and others supporting browsers in Seleniumhq.org All the downloaded files will be in zip format Right click and extract in a folder (All the drivers) Now follow the steps in Eclipse Right click on Project Name (My project name is Selenium) -> Select New -> Folder Type Folder name as drivers Copy all the drivers files which are already extracted and stores in a folder Right click on the drivers folder and paste Now you can see all the required drivers are ready ...

Hands On Maven (First Project)

What is Maven? Maven is an automation build tool which is based on POM (Project Object Module). Maven has so many feature, we will discuss it later. As of now lets create our first project. Steps to be followed: File -> New Project Click Maven -> Maven Project -> Next Check Create Simple Project -> Next Type in Group Id  Type in Artifact Id (It is your project name)  As soon as you crated a project it will take time to load maven settings. Once loaded you can see the project structure in Package Explorer Now double click on pom.xml and select the pom.xml tab in right hand side After the version tag add the maven dependencies As soon as you added the dependencies and save the file (CTRL + S) it will starts downloading required files from Maven repo Once the downloaded are completed you able to see a Maven Dependencies in the Package Explorer Advantage of Maven: Single dependency will internally call others required de...

Setting up tools..

Required Software: Java: Java is an open source programming language, Selenium can be Scripted in so many languages, in this tutorial we are going to use Java  Eclipse: Eclipse is an editor which provides great suggestion and of course open source Browser: All the browsers are open source so you can what ever you like, In my tutorial I am going to use Chrome Steps to followed to set up your first automation project: Download & Install java -  Download Java Set java path in environment variables Download Eclipse from the given link. (Any version of Eclipse is fine, Recommended to use latest version) Download Eclipse   - Download based on your system 32 (X86) or 64 bit Once downloaded, you will get a zip file Right click on the zip file and extract in your local disk (Preferably not in C driver -  (Desktop)) Inside the folder you will eclipse.exe file Optional: Right click on eclipse.exe and select send to Desktop - To create a short cut for futu...