I am new to Selenium and having some issues.
I am using the WebDriverManager in connection with Selenium. This is my code:
WebDriverManager.chromedriver().setup();
When I run the code on my local system (Windows 10 OS), everything runs perfectly fine. When I run my code as a web application on our Linux Server (Ubuntu 18.04, Tomcat 9), I get the following exception:
io.github.bonigarcia.wdm.config.WebDriverManagerException: Exception reading resolution cache as a properties file
at io.github.bonigarcia.wdm.cache.ResolutionCache.<init>(ResolutionCache.java:86)
at io.github.bonigarcia.wdm.WebDriverManager.getResolutionCache(WebDriverManager.java:1490)
at io.github.bonigarcia.wdm.WebDriverManager.clearResolutionCache(WebDriverManager.java:780)
at io.github.bonigarcia.wdm.WebDriverManager.handleException(WebDriverManager.java:1263)
at io.github.bonigarcia.wdm.WebDriverManager.manage(WebDriverManager.java:1060)
at io.github.bonigarcia.wdm.WebDriverManager.setup(WebDriverManager.java:393)
....
Caused by: java.io.IOException: No such file or directory
at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.base/java.io.File.createNewFile(File.java:1035)
at io.github.bonigarcia.wdm.cache.ResolutionCache.<init>(ResolutionCache.java:75)
I am using Selenium 4.2.1 and Webdriver 5.1.0.
On our Linux server, I have installed Google Chrome as described here. When running
google-chrome --version
-> Google Chrome 102.0.5005.115
I get the shown result, so I think Chrome should be installed correctly. Has anybody an idea?