I have a WebDriver 3.5 based testsuite written in Java.
It is working well when I execute it from IntelliJ IDEA. I get following error message, when I build it in Jenkins.
org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
System.setProperty("webdriver.chrome.driver", "C:\\chromedriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--headless");
driver = new ChromeDriver(chromeOptions);
No Chrome binary is needed to execute it from IDE. Jenkins is installed on the same machine as IntelliJ IDEA.