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