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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.