I have a basic login test with selenium and testng. When executed from eclipse, it works as expected and invoke Google Chrome. If executed from TESTNG command line, it works
It worked for me. I have coded as below
ChromeOptions chromeOptions= new ChromeOptions();
chromeOptions.setBinary("C:\\Users\\kannanu\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe");
System.setProperty("webdriver.chrome.driver",ChromeExePath);
ChromeDriver driver = new ChromeDriver(chromeOptions);
driver.get("http://newtours.demoaut.com/");