selenium First project in selenium with Java Opening up a Website using Selenium


We use the get method to go to a website. For Example, this would open google

public static void main(String[] args) throws InterruptedException {
    System.setProperty("", "path of the exe file\\chromedriver.exe");
    WebDriver driver = new ChromeDriver();
    Thread.sleep(3000); //wait for 3 seconds
    driver.quit();      //close Chrome

driver.quit() closes the Browser. To create a delay, we use Thread.sleep(3000).