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

后端 未结 9 1112
佛祖请我去吃肉
佛祖请我去吃肉 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:07

    I have faced the same issue when trying to access a tab inside an iframe , it used to work fine on version 76. Now that has updated itself to 78, it's failing. Have tried waits , implicit waits , sleep , locate the elements using xpath, CSS, id , switch context , scroll until view , etc.., with no luck. I'm using windows 10 , 1809. I don't know if this is happening in other OS.

    Here is the question I raised :

    Problem using chromedriver 78.0.3904.70 locators

    0 讨论(0)
  • 2020-12-17 11:11

    I had the same issue.

    After auto-updating Chrome with version 78.0, my automated test scripts were failing. So I updated chromedriver to the 78 version, but driver was still not able to find any web element. After that I tried with multiple versions of chromedriver and finally my issue is resolved with chromedriver version 2.44.

    This version can be found at https://chromedriver.storage.googleapis.com/index.html?path=2.44/

    0 讨论(0)
  • 2020-12-17 11:14

    It turned out to be a problem with the Google Chrome, not chromedriver: https://bugs.chromium.org/p/chromedriver/issues/detail?id=3211

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-12-17 11:18

    You can Nuget package manager, delete Chrome drive and search for chrome, download the new version selenium.web.driver.ChromeDriver >> for jsaKamoto

    there you find chrome version 78.

    0 讨论(0)
  • 2020-12-17 11:19

    By adding the following argument I have solved my problem.

       ChromeOptions options = new ChromeOptions();
        options.addArguments("--disable-gpu");
        options.addArguments("--disable-extensions");
        options.setExperimentalOption("useAutomationExtension", false);
        options.addArguments("--window-size=1920,1080");
        options.merge(seleniumCapabilities);
        driver = new ChromeDriver(options);
    
    0 讨论(0)
提交回复
热议问题