0

I am using WebDriverManager (WebDriverManager.firefoxdriver().setup()) to manage the binary files in my selenium tests. Locally I can run my tests but on jenkins I get errors. Is it possible to use WebDriverManager with jenkins? Do I need to configure anything in order to make my tests run also on jenkins?

[TestNG-tests-1] INFO io.github.bonigarcia.wdm.WebDriverManager - Reading 
https://chromedriver.storage.googleapis.com/ to seek chromedriver
[TestNG-tests-1] INFO io.github.bonigarcia.wdm.online.Downloader - Downloading 
https://chromedriver.storage.googleapis.com/86.0.4240.22/chromedriver_linux64.zip
[TestNG-tests-1] INFO io.github.bonigarcia.wdm.online.Downloader - Extracting driver from 
compressed file chromedriver_linux64.zip
[TestNG-tests-1] INFO io.github.bonigarcia.wdm.WebDriverManager - Exporting 
webdriver.chrome.driver as 
/home/jenkins/.cache/selenium/chromedriver/linux64/86.0.4240.22/chromedriver
/home/jenkins/.cache/selenium/chromedriver/linux64/86.0.4240.22/chromedriver: error while 
loading shared libraries: libnss3.so: cannot open shared object file: No such file or 
directory
kidulf
  • 419
  • 1
  • 6
  • 17
  • You need to install [Libnss3.so](https://stackoverflow.com/q/58134793/598141) or configure properly (LD_LIBRARY_PATH) – Ian W Nov 01 '20 at 21:16

1 Answers1

0

As you are downloading the Chromedriver and extracting it, I guess Extraction is not happening. Did you try placing the Chrome driver at a particular location and point it in pipeline syntax that location to execute. I think it should work in that way.

Sonali Das
  • 943
  • 1
  • 7
  • 24