Closed jbrichau closed 3 years ago
The problem had started popping up in the Seaside builds: https://github.com/SeasideSt/Seaside/runs/2814783250
For now, I disabled the tests that use getAttribute:
until it gets fixed in Parasol / Chromedriver
The workaround using executeScript:with
, which is essentially proposed by https://janmolak.com/chrome-91-might-break-your-tests-507309b9b2cd
does not work for the attributes value
and innerHTML
(at least). You cannot get the value of an inputfield in Javascript using field.getAttribute('value')
but rather through field.value
.
In addition, the chromium team claims that the change only affects legacy mode and not the (default) w3c mode. This is clearly false for the above two usecases and there are other people reporting it. It's not clear to me at this point if they want to fix this or not but currently there is no way to get the value of an inputfield using ChromeDriver and Selenium 3, other than via Javascript. I don't know if Selenium 4 has support for it, nor how much work we have to upgrade to it.
Note that I tried running Parasol with Selenium 4.0.0-beta-4 and the same tests failed as Selenium 3. That's good and bad news. The good news is Parasol just works with Selenium 4 (as far as the test coverage is concerned) and the bad news is that Chromedriver really changed the meaning of getAttribute:
.
Parasol is affected by a bug introduced in chromedriver 91.0.4472.19 :https://bugs.chromium.org/p/chromium/issues/detail?id=1205107 Although the issue is reportedly fixed in chromedriver 91.0.4472.101, the
getAttribute:
method still returns nil when trying to retrieve thevalue
of an input field.More context: https://janmolak.com/chrome-91-might-break-your-tests-507309b9b2cd