Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97793

Two browsers are opening automatically in selenium

$
0
0

The following is my code. One browser opens blank and another opens google. I am using the latest version of chrome driver. Thanks in advance.

public class Trials {

public static void main(String[] args) throws InterruptedException 
{


    System.setProperty("webdriver.chrome.driver","C:\\Selenium\\chromedriver.exe");

    WebDriver driver = new ChromeDriver();

    driver.get("https://www.google.com");
    Thread.sleep(3000);
    driver.close();

}

}

Viewing all articles
Browse latest Browse all 97793

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>