-1

So i set up some web testing, it runs locally fine, but after I deployed this on a pipeline on the devops Buddy I get following error while it runs my tests:

Java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html

I guess I need to add some variables for the server to find/have the chromedriver or is it something else I need to do/adress?

thomarkey
  • 129
  • 1
  • 13

1 Answers1

0

The thing is that chromedriver is not installed in the agent where you are trying to run the test script. Please download the chromedriver first and then add the chromedriver path in the environment variable. Otherwise you can use System.setProperty("webdriver.chrome.driver", ""); to set the chromedriver with the help of your test scripts.

UnknownBeast
  • 979
  • 1
  • 6
  • 13
  • I have installed te chromedriver locally, thats why I can run the test on my machine. So I dont think the server where it's deployed will use my path. I guess I need to adress a remote chromedriver rite? – thomarkey May 13 '20 at 17:38
  • Locally it will work perfectly but when it comes to running the test in the chrome in your server then you must have the chromedriver.exe in that server too and your code must point to the path same as the chromedriver path present in the server. – UnknownBeast May 13 '20 at 17:46
  • Okay but I cant find where I have to address this, is it in the driverprovider or dockerprovider class? or is it in the beforesuite in the testrunner class – thomarkey May 13 '20 at 18:05
  • Once you download the chromedriver executable file then before the initialisation webdriver instance you need to add the aforementioned line.For example System.setProperty("webdriver.chrome.driver",""); Webdriver driver = new Chromedriver (); – UnknownBeast May 14 '20 at 02:33