Java code to open a web page in Google Chrome Browser using Selenium WebDriver

Java code to open a web page in Google Chrome Browser using Selenium WebDriver

The following sample code will open Google site in the Chrome Browser.

Sample Code:

package seleniumPackage;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class OpenWebPage {
		
	public static void main( String[] args ) {
		
		WebDriver wd = new ChromeDriver();
		wd.get(
			"https://www.google.com"
		);
	
	}

}

Leave a Reply