When I run the below code first time, the website opens with extensions but the website would not load. Click on Terminate and when I run it second time, it is successful. How to run the code successfully first time?
System.setProperty("webdriver.chrome.driver","C:\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=C:/Users/user_name/AppData/Local/Google/ Chrome/User Data");
options.addArguments("--start-maximized");
driver = new ChromeDriver(options);
driver.get("name of the website")
Can you try the below code -