首页 > 代码库 > selenium中3种浏览器的设置

selenium中3种浏览器的设置

case    IE :
   System.setProperty("webdriver.ie.driver","C:\\Program Files\\Internet Explorer\\IEDriverServer.exe");
   driver = new InternetExplorerDriver();

   break;

  case  Chrome :
   System.setProperty("webdriver.chrome.driver", "C:\\Program Files\\Google\\Chrome\\Application\\chromedriver.exe");
   driver = new ChromeDriver();
   break;

  case FireFox :
    System.setProperty("webdriver.firefox.bin","C:\\Program Files\\Mozilla Firefox\\firefox.exe");
    driver = new FirefoxDriver();
    break;

selenium中3种浏览器的设置