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);


你可能感兴趣的:(selenium)