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
This code i tried it solved my one week unresolved problem,
Thanks to Aastha Chopra..
ChromeOptions chromeOptions= new ChromeOptions(); chromeOptions.setBinary("C:\Program Files (x86)\Google\Chrome Beta\Application\chrome.exe"); System.setProperty("webdriver.chrome.driver","C:\STUDY\Selenium\CHROMEDRIVERS\chromedriver.exe");
ChromeDriver driver = new ChromeDriver(chromeOptions); driver.get("http://newtours.demoaut.com/");