Oops, do it this way:
1º - Download the . exe driver and put it inside your test sources directory. Something like: src/test/Resources/chromedriver.exe.
This directory will be fit to be commited.
2º - In your test class, where you are trying to register the Property, search the exe for this.getClass().getResource("chromedriver.exe").getPath();
. It will fetch the executable from within the test source, where you stored the exe.
3º Enjoy!
4º - If you are using Arquillian + Maven, the arquilian.xml configuration file requires the extensions:
<extension qualifier="webdriver">
<property name="browser">${browser}</property>
<property name="chromeDriverBinary">${chromeDriverBinary}</property>
</extension>
and properties must be registered in Maven pom.xml.
<properties>
<browser>chrome</browser>
<chromeDriverBinary>src/test/resources/chromedriver.exe</chromeDriverBinary>
</properties>
I tested it as suggested and was giving Nullpointerexception. But it worked when using this.getClass(). getClassLoader(). getResource("chromedriver.exe"). getPath(). Thanks for the help!
– Gilberto