I am using Netbeans 8.2 and i am trying to put the chrome and firefox webdrivers under src/main/resources, so that my teat can be run from any other PC, but when i set the system Property to point to src/main/resources/chrome/chromedriver
, it gives me the error The driver executable does not exist: /src/main/resources/chromedriver
.
But when i put the full path to the webdriver it woks fine like /home/username/NetBeansProjects/projectname/src/main/resources/chrome/chromedriver
, the problem is that i want my tests to be runnable on different PCs without any changes, and the first part of the full path must be adjusted from PC to another, but the second part of the path /src/main/resources/chrome/chromedriver
that is the one i want to use because that will make my tests runnable in different PCs without any changes in the system property, how can i do that and avoid the above error??
I have searched netbeans documentation but did not find any thing about that, i have also tried the solution in : How to start FireFoxDriver using Selenium 3.4.0 using Maven?
they are saying that it is important to have the drivers under /src/main/resources/
but they did not say any thing about how to avoid the above error
I have also tried How to get the path for .exe file which resides in src/main/resources
But I had the error utilities.Driver.Initialize(Driver.java:34)
thank you for your help in advance,