Hi,
We are running jasmine tests using google chrome driver (headless). We just switched from phantomjs. We are able to execute tests if we set up the chrome driver binary path when we run mvn as below:
$ mvn -Dwebdriver.chrome.driver=src/test/resources/chromedriver.exe
But we want to set up the above property in pom.xml (either in jasmine plugin configuration or maven surefire plugin). But no luck :-(
We tried the following:
<configuration>
<systemPropertyVariables>
<webdriver.chrome.driver>${project.basedir}/src/test/resources/chromedriver.exe</webdriver.chrome.driver>
</systemPropertyVariables>
</configuration>
<configuration>
<systemPropertyVariables>
<webdriver.chrome.driver>src/test/resources/chromedriver.exe</webdriver.chrome.driver>
</systemPropertyVariables>
</configuration>
<configuration>
<argLine>-Dwebdriver.chrome.driver=src/test/resources/chromedriver.exe
</configuration>
<configuration>
<jvmArguments>
-Dwebdriver.chrome.driver=src/test/resources/chromedriver.exe
</jvmArguments>
</configuration>
Also setting up a property in <properties> section and then refer it in plug ins. None of the above options helps. We always get the following error:
[ERROR] Failed to execute goal com.github.searls:jasmine-maven-plugin:2.1:test (default) on project connect: The jasmine-maven-plugin encountered an exception:
[ERROR] java.lang.reflect.InvocationTargetException
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Please advise what we are doing wrong and how to set up chrome binary path in pom.xml.