Using Firefox and GeckoDriver
Using Selenium v4.10.0, GeckoDriver v0.33.0 and firefox v114.0.1 you can use the minimum code block:
WebDriver driver = new FirefoxDriver();
driver.get("https://www.selenium.dev/");
Console Output:
Jun 11, 2023 3:58:24 AM org.openqa.selenium.remote.service.DriverService$Builder getLogOutput
INFO: Driver logs no longer sent to console by default; https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-output
Using Chrome and ChromeDriver
Using Selenium v4.10.0, ChromeDriver v114.0 and google-chrome v114.0 you can use the minimum code block:
ChromeOptions options = new ChromeOptions();
options.addArguments("--start-maximized");
options.addArguments("--remote-allow-origins=*");
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.selenium.dev/");
Console Output:
Jun 11, 2023 3:58:24 AM org.openqa.selenium.remote.service.DriverService$Builder getLogOutput
INFO: Driver logs no longer sent to console by default; https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-output