Automation Script Implementation in Webdriver
Quality,  Selenium,  Software Testing,  Webdriver

Automation Script Implementation in Webdriver

Automation Script Implementation in Webdriver:

Let’s know, how to do Automation Script Implementation in Webdriver in Eclipse by using Java. Here in this article, I have implemented a Selenium Webdriver automation script of Practice form to fill for the purpose of Practice for Automation Testing.

In this script, I have taken Project Name: Selenium Automation, Package name: Practice, Classname: Webdriver_Practice

In this script I have used to automate Text boxes, dropdown, Multiple options select in List box, Button, Radio button, Checkbox, Image path for upload, parameterization, Google chrome browser launch etc.


package Practice.Practice;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;




public class Webdriver_Practice {               

                public WebDriver driver;


                public void Chrome_Launch() {

                           System.setProperty(“”, “D:\\Selenium\\Library\\chromedriver.exe”);

                           driver=new ChromeDriver();



                public void Url_0pen() {





              public void Practice_Automation_Form(){

 driver.findElement(By.partialLinkText(“Partial Link Test”)).click();  //click on Partial Link Test                                                               driver.findElement(By.xpath(“/html/body/div[1]/div[5]/div[2]/div/div/div[1]/div/div/div/div[2] /div/form/fieldset/div[8]/input”)).sendKeys(“Test”);  //Enter First Name

 driver.findElement(By.xpath(“/html/body/div[1]/div[5]/div[2]/div/div/div[1]/div/div/div/div[2] /div/form/fieldset/div[11]/input”)).sendKeys(“Name1”);   //Enter Last Name

 driver.findElement(“sex-0”)).click();  // Select the Sex as Male

 driver.findElement(“exp-3”)).click();  // Select the Years of Experience

 driver.findElement(“profession-0”)).click(); // click on check box of Profession as Manual Tester

 driver.findElement(“profession-1”)).click(); // click on check box of Profession as Automation Tester

 driver.findElement(“photo”)).sendKeys(“C:\\Users\\Public\\Pictures\\Sample Pictures\\test.jpg”); // This line of code will upload the Profile pic from the Local system drive

 new Select(driver.findElement(“continents”))).selectByVisibleText(“Australia”); // This line of code is for Select the value from a dropdown field.                     


 /*This below method is to select multiple options in a Listbox or dropdown  */        

  public void Select_Multiple_Options_In_Listbox(){

                               WebElement Groupid_select=driver.findElement(“selenium_commands”));

                                Select group=new Select(Groupid_select);

                                group.selectByVisibleText(“Browser Commands”);

                                group.selectByVisibleText(“Navigation Commands”);

                                group.selectByVisibleText(“Wait Commands”);



                public void Submit_Form(){

                                driver.findElement(“submit”)).click();  // click on the Submit button




                public static void main(String[] args) {

                                // TODO Auto-generated method stub

                               Webdriver_Practice d=new Webdriver_Practice();









Please click here to Read Browser Launch in Selenium Webdriver

Please click here to Read X-path through Firebug and FirePath


  • Hairstyles

    I have observed that in the world of today, video games are classified as the latest rage with children of all ages. There are occassions when it may be impossible to drag your children away from the games. If you want the best of both worlds, there are several educational video games for kids. Thanks for your post.

  • Hairstyles

    My spouse and I absolutely love your blog and find most of your post’s to be just what I’m looking for. Do you offer guest writers to write content for yourself? I wouldn’t mind creating a post or elaborating on a few of the subjects you write regarding here. Again, awesome blog!

  • Hairstyles

    Can I just say what a reduction to find somebody who really is aware of what theyre speaking about on the internet. You definitely know learn how to bring a difficulty to light and make it important. Extra folks must learn this and perceive this side of the story. I cant believe youre no more fashionable since you definitely have the gift.

  • red bottom shoes

    I must express some appreciation to the writer just for rescuing me from such a trouble. Right after checking through the the web and obtaining advice which are not beneficial, I was thinking my life was done. Being alive without the presence of strategies to the problems you have resolved by way of your article content is a serious case, as well as the ones which might have adversely damaged my entire career if I had not come across your blog. Your main mastery and kindness in maneuvering all the pieces was valuable. I’m not sure what I would’ve done if I had not come upon such a step like this. I’m able to at this moment relish my future. Thanks so much for your specialized and result oriented help. I won’t hesitate to endorse your blog to any individual who would like guidance about this subject.

Leave a Reply

Your email address will not be published. Required fields are marked *