首页 > 代码库 > 【Selenium】Selenium2

【Selenium】Selenium2

(一)选择浏览器开始测试

①支持浏览器

Firefox(FirefoxDriver)

IE(IeternetExplorerDriver)

Chrome(ChromeDriver)

Opera(OperaDriver)

Android(AndroidDriver)

iphone(iphoneDriver)

②创建Selenium实例

System.setProperty("webdriver.firefox.bin","D://firefox.exe");
System.setProperty("webdriver.chrome.driver","C:\\Selenium\\chromedriver.exe");
System.setProperty("webdriver.ie.driver","C:\\IEDriverServer.exe");
WebDriver driver=new InternetExplorerDriver();
WebDriver driver=new ChromeDriver();
WebDriver driver=new FirefoxDriver();

 

【Selenium】Selenium2