Hi SiKing
Thanx for your note. I have to correct my console output. There it says something about a FirefoxDriver which is not addressed in the source code at all. The console output and the source code were not in sync. Here's the correct source code:
import framework.TestingConstants;
import org.openqa.selenium.chrome.ChromeDriver;
import java.io.File;
public class TestImplWithoutWebDriverManager implements TestingConstants
{
static public void main(String... args)
{
String chromeDriverLibPath = "./lib/chromedriver";
File chromeDriverLib = new File(chromeDriverLibPath);
System.out.println(chromeDriverLib.exists());
System.out.println(chromeDriverLib.canRead());
System.setProperty("webdriver.chrome.driver", chromeDriverLibPath);
ChromeDriver chromeDriver = new ChromeDriver();
chromeDriver
.navigate()
.to(MyTestHomePage);
}
}
and the correct console output:
true
true
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:576)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:245)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:161)
at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:108)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:106)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:93)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:48)
at TestImplWithoutWebDriverManager.main(TestImplWithoutWebDriverManager.java:15)
Caused by: org.openqa.selenium.WebDriverException: Driver server process died prematurely.
Build info: version: '4.1.2', revision: '9a5a329c5a'
System info: host: 'Lemmis-MacBook-Pro-16.local', ip: '192.168.0.2', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '12.3', java.version: '1.8.0_312'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:226)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:98)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:558)
... 7 more
Process finished with exit code 1