Setting the property in Environment Variables to Open Browser in Selenium.
Navigate to Control Panel\System and Security\System\Advanced System Settings\Advance\Environment variables- Add the TEMP as below
- Select the Path System variable and click on Edit button. Now move to the end of the Variable value field, then add a semi colon (;)
- Add the ChromeDriver’s folder location
- Click Apply and OK
5.Add the script as below
ChromeDriver driver = new ChromeDriver();
driver.get("http://www.google.com");
6.Run the script,observe the script will execute änd open Chrome Browser with out "System.setProperty("webdriver.chrome.driver", "C:\\Users\\prasanthi.podila\\eclipse-workspace\\FrameworkFile\\ExternalFiles\\chromedriver_win32\\chromedriver.exe"); command