Possible issue with Chromedriver 78, Selenium can not find web element of PDF opened in Chrome

后端 未结 9 1118
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-17 11:02

Until my google Chrome wasn\'t updated to version 78 my code worked fine. I also updated the chromedriver to version 78.0.3904.70. So I am not able anymore to find WebElemen

9条回答
  •  甜味超标
    2020-12-17 11:17

    I've run into the same issue.

    Apparently Chrome automatically updates itself. Yesterday (Oct 29 '19) My ChromeDriver started complaining that it was not compatible with Chrome 78. I updated the driver to the 78 version. I started to get random org.openqa.selenium.NoSuchElementException exceptions when trying to find elements that I confirmed were there. The findElement[s] also work when I used breakpoints. I also tried implicit waits, with only limited success.

    I tried zsbappa's ChromeOption solution but no joy.

    Google makes it hard to get old versions of Chrome, but I found version 76 at https://www.neowin.net/news/google-chrome-76-offline-installer/. Beware, the online installer installs the latest version. I reverted to the driver for 76 and all is good. All my Selenium tests are working again.

    My conclusion is that the Chrome 78 and it's associated driver has a race condition where Selenium attempts to interrogate the web page before it's complete.

提交回复
热议问题