Monday, 17 December 2012

Selenium webdriver

import org.openqa.selenium.By;

import org.openqa.selenium.firefox.FirefoxDriver;


//import org.openqa.selenium.ie.InternetExplorerDriver;

public class webdr1
{
    public static void main(String[] args) throws Exception
     {
     FirefoxDriver fd=new FirefoxDriver();
     fd.get("http://www.google.co.in");
     fd.findElement(By.name("q")).sendKeys("testing");
     fd.findElement(By.name("btnG")).click();
        
    }

}

No comments:

Post a Comment