import org.openqa.selenium.*;
import org.openqa.selenium.chrome.*;
import org.openqa.selenium.firefox.*;
public class DemoChrome {
public static void main(String[] args) throws Exception{
// System.setProperty("webdriver.gecko.driver", "Resources/geckodriver");
// WebDriver driver=new FirefoxDriver();
System.setProperty("webdriver.chrome.driver", "Resources/chromedriver");
WebDriver driver=new ChromeDriver();
driver.get("http://5elementslearning.com/demosite");
//the above command will launch the chrome browser with this application.
Thread.sleep(5000); //wait for 5 seconds
driver.quit(); //close all instance of chrome browser which are opened from this program.
}
}
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ed1560be-b59f-4974-a383-e45c98edf799%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.