Wednesday, 10 July 2013

Selenium :- How to Open Chrome Browser

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class chrome1 {
 public static void main(String[] args)
 {
  System.setProperty("webdriver.chrome.driver","D:\\Chrome\\chromedriver.exe"); //path of     
  chromeDriver.exe file

  WebDriver driver = new ChromeDriver();

  driver.get(" http://yahoo.com ");
 }
}                                           

No comments:

Post a Comment