5

I'm running my Selenium CI tests on a remote Jenkins Linux machine. I'm also using WebDriverManager to manage the Chromedriver.

The remote Chrome version is 79.0.3945.88. This is something I don't have permission to change. When Chrome version got updated from 78 I started getting warnings

07:26:19 [1579242379.444][WARNING]: This version of ChromeDriver has not been tested with Chrome version 79.

So I updated the Chromedriver

WebDriverManager.chromedriver().version("79.0.3945.88").setup();

but then I would get

09:02:35 09:02:35.908 [main] DEBUG i.g.bonigarcia.wdm.WebDriverManager - The proper chromedriver version for your Google Chrome is unknown ... trying with the latest
09:02:37 09:02:36.999 [main] DEBUG i.g.bonigarcia.wdm.WebDriverManager - Latest version of chromedriver according to https://chromedriver.storage.googleapis.com/LATEST_RELEASE is 79.0.3945.36
09:02:37 09:02:37.030 [main] INFO  i.g.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as /var/lib/jenkins/.m2/repository/webdriver/chromedriver/linux64/79.0.3945.36/chromedriver

And the test would still fail, because the HTML of the page wouldn't load. I tried extending wait times, but this didn't help.

As suggested here the next thing I tried all of the Chromedriver 78 and 79 versions found at https://chromedriver.chromium.org/downloads but none worked.

After that, I tried to find a precise .88 version and used this

WebDriverManager.chromedriver().targetPath("https://centos.pkgs.org/7/epel-x86_64/chromedriver-79.0.3945.88-1.el7.x86_64.rpm.html").version("79.0.3904.88").setup();

but the result was:

13:33:47 13:33:47.404 [main] INFO  i.g.bonigarcia.wdm.WebDriverManager - Reading https://chromedriver.storage.googleapis.com/ to seek chromedriver
13:33:48 13:33:48.566 [main] ERROR i.g.bonigarcia.wdm.WebDriverManager - chromedriver 79.0.3904.88 for LINUX64 not found in https://chromedriver.storage.googleapis.com/
13:33:48 13:33:48.568 [main] WARN  i.g.bonigarcia.wdm.WebDriverManager - There was an error managing chromedriver 79.0.3904.88 (chromedriver 79.0.3904.88 for LINUX64 not found in https://chromedriver.storage.googleapis.com/) ... trying again using mirror
13:34:59 13:34:59.973 [main] ERROR i.g.bonigarcia.wdm.WebDriverManager - chromedriver 79.0.3904.88 for LINUX64 not found in http://npm.taobao.org/mirrors/chromedriver/
13:34:59 13:34:59.973 [main] WARN  i.g.bonigarcia.wdm.WebDriverManager - There was an error managing chromedriver 79.0.3904.88 (chromedriver 79.0.3904.88 for LINUX64 not found in http://npm.taobao.org/mirrors/chromedriver/) ... trying again using latest from cache
13:35:03 13:35:03.454 [main] DEBUG i.g.bonigarcia.wdm.WebDriverManager - Latest version of chromedriver according to http://npm.taobao.org/mirrors/chromedriver/LATEST_RELEASE is 79.0.3945.36
13:35:53 13:35:53.530 [main] INFO  io.github.bonigarcia.wdm.Downloader - Downloading http://npm.taobao.org/mirrors/chromedriver/79.0.3945.36/chromedriver_linux64.zip
13:35:54 13:35:54.771 [main] INFO  io.github.bonigarcia.wdm.Downloader - Extracting binary from compressed file chromedriver_linux64.zip

I've also updated WebDriverManager from 3.2.0 to 3.7.0 and finally to 3.8.1 but nothing helped.

Is there a way for me to load a precise 79.0.3945.88. version of Chromedriver?

Or is there another workaround?

Mate Mrše
  • 7,997
  • 10
  • 40
  • 77
  • 1
    There is no version 79.0.3945.88, you should use version 79.0.3945.36. Did you download it? – Guy Jan 27 '20 at 13:24
  • Web Driver Manager takes care of it. It defaulted to .36 when .88 was not found. But it didn't help. – Mate Mrše Jan 27 '20 at 13:46
  • What happened when you tried it? – Guy Jan 27 '20 at 13:47
  • There was no warnings from web driver manager, but the tests still failed because the HTML elements were not found on the page. – Mate Mrše Jan 27 '20 at 13:52
  • This could be a simple matter of timing issue, do you use waits? – Guy Jan 27 '20 at 13:53
  • Yes, as I've mentioned in OP, I tried different wait times (up to a minute), but no use. – Mate Mrše Jan 27 '20 at 14:01
  • Is the browser maximized on the remote machine? if the jenkins slave runs as a service the browser will be smaller, which might effect the tests. Even as a regular process it might run in a smaller mode. – Guy Jan 27 '20 at 14:09
  • It is maximized. I get the screenshots on failure that is why I know the HTML is not loaded properly. I can see the header and footer elements, but not the table elements. As I said, it is not a timing issue, I suspect chromedriver is not loading the elements properly. – Mate Mrše Jan 27 '20 at 14:13
  • 1
    Chromedriver doesn't load the elements, it's just a connection to the browser. If you navigate to the site manually on this browser version is it loading properly? you could also try to refresh the page with the driver, it's a horrible workaround but it might indicate if it's really a loading problem. – Guy Jan 27 '20 at 14:22

2 Answers2

2

All chromedriver versions could be found: https://chromedriver.storage.googleapis.com so latest for 79 at this moment is 79.0.3945.36 . You could probably use it or even newer such as 80.0.3987.16 .

I personally use tool selenium-standalone which makes this task just work. Of course You could also download driver manually and use it. But just start with simplest example of driver that will work.

SkorpEN
  • 2,491
  • 1
  • 22
  • 28
0

Resolved! steps:

1.) Download chrome webdriver (check your installed chrome version and download the relevant driver) form: https://sites.google.com/a/chromium.org/chromedriver/downloads

2.) Add these lines:

System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");

ChromeDriver driver = new ChromeDriver();

3.) Remove or comment following: (if present in your code)

WebDriverManager.chromedriver().setup();

WebDriver driver = new ChromeDriver();