首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

selenium起动firefox、chrome和IE

2012-09-01 
selenium启动firefox、chrome和IESystem.setProperty(webdriver.chrome.driver,chrome的路径))WebDriv

selenium启动firefox、chrome和IE
System.setProperty("webdriver.chrome.driver","chrome的路径"));
WebDriver driver = new ChromeDriver();
System.setProperty("webdriver.firefox.bin","firefox的路径"));
WebDriver driver = new FirefoxDriver();

DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
WebDriver driver = new InternetExplorerDriver(ieCapabilities);


热点排行