• <bdo id='3T82t'></bdo><ul id='3T82t'></ul>
  • <legend id='3T82t'><style id='3T82t'><dir id='3T82t'><q id='3T82t'></q></dir></style></legend>

      <i id='3T82t'><tr id='3T82t'><dt id='3T82t'><q id='3T82t'><span id='3T82t'><b id='3T82t'><form id='3T82t'><ins id='3T82t'></ins><ul id='3T82t'></ul><sub id='3T82t'></sub></form><legend id='3T82t'></legend><bdo id='3T82t'><pre id='3T82t'><center id='3T82t'></center></pre></bdo></b><th id='3T82t'></th></span></q></dt></tr></i><div id='3T82t'><tfoot id='3T82t'></tfoot><dl id='3T82t'><fieldset id='3T82t'></fieldset></dl></div>
      1. <tfoot id='3T82t'></tfoot>

        <small id='3T82t'></small><noframes id='3T82t'>

        Chromedriver 78 可能存在问题,Selenium 找不到在 Ch

        时间:2023-09-28
      2. <legend id='S9EXu'><style id='S9EXu'><dir id='S9EXu'><q id='S9EXu'></q></dir></style></legend>
            <tfoot id='S9EXu'></tfoot>
            <i id='S9EXu'><tr id='S9EXu'><dt id='S9EXu'><q id='S9EXu'><span id='S9EXu'><b id='S9EXu'><form id='S9EXu'><ins id='S9EXu'></ins><ul id='S9EXu'></ul><sub id='S9EXu'></sub></form><legend id='S9EXu'></legend><bdo id='S9EXu'><pre id='S9EXu'><center id='S9EXu'></center></pre></bdo></b><th id='S9EXu'></th></span></q></dt></tr></i><div id='S9EXu'><tfoot id='S9EXu'></tfoot><dl id='S9EXu'><fieldset id='S9EXu'></fieldset></dl></div>

            <small id='S9EXu'></small><noframes id='S9EXu'>

                <tbody id='S9EXu'></tbody>

                <bdo id='S9EXu'></bdo><ul id='S9EXu'></ul>

                • 本文介绍了Chromedriver 78 可能存在问题,Selenium 找不到在 Chrome 中打开的 PDF 的 Web 元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  在我的谷歌浏览器没有更新到版本 78 之前,我的代码运行良好.我还将 chromedriver 更新到版本 78.0.3904.70.所以我再也无法使用 Selenium WebDriver 和 Java 找到 id='plugin' 的 WebElement:

                  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 WebElement with id='plugin' using Selenium WebDriver and Java:

                  <html>
                  <div id="content">
                  <embed id="plugin" type="application/x-google-chrome-pdf" src="http://??????????/offer_printed.php?printable=yes&amp;reanudar=&amp;>
                  </div>
                  </html>
                  

                  除此之外,我的测试工作正常.我以前从未遇到过类似的问题.我也试图找到 WebElement id='content' 但我收到了同样的错误.

                  Other than that part my tests are working fine. I never had a similar issue before. I also tried to find WebElement id='content' but I am receiving the same error.

                  WebDriverWait wait = new WebDriverWait (driver, 90);
                  WebElement scrollvalid = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("plugin")));
                  
                  scrollvalid.sendKeys(Keys.PAGE_DOWN);                       scrollvalid.sendKeys(Keys.PAGE_DOWN);
                  

                  我的自动化脚本应该找到 PDF 元素并向下滚动页面.相反,我收到此错误:org.openqa.selenium.TimeoutException:90 秒后超时等待 By.id 定位的元素的可见性:插件

                  My automation script should find the PDF element and scroll the page down. Instead, I am receiving this error: org.openqa.selenium.TimeoutException: Timed out after 90 seconds waiting for visibility of element located by By.id: plugin

                  有人遇到过类似的问题吗?提前致谢.

                  Is anybody facing a similar issue? Thanks in advance.

                  推荐答案

                  我也遇到了同样的问题.

                  I've run into the same issue.

                  显然 Chrome 会自动更新.昨天(2019 年 10 月 29 日)我的 ChromeDriver 开始抱怨它与 Chrome 78 不兼容.我将驱动程序更新到 78 版本.在尝试查找我确认存在的元素时,我开始随机出现 org.openqa.selenium.NoSuchElementException 异常.当我使用断点时, findElement[s] 也可以工作.我也尝试过隐式等待,但效果有限.

                  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.

                  我尝试了 zsbappa 的 ChromeOption 解决方案,但没有任何乐趣.

                  I tried zsbappa's ChromeOption solution but no joy.

                  Google 很难获得旧版本的 Chrome,但我在 https://www.neowin.net/news/google-chrome-76-offline-installer/.请注意,在线安装程序会安装最新版本.我恢复了 76 的驱动程序,一切都很好.我所有的 Selenium 测试都重新开始工作了.

                  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.

                  我的结论是 Chrome 78 及其相关驱动程序存在竞争条件,即 Selenium 会在网页完成之前尝试询问网页.

                  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.

                  这篇关于Chromedriver 78 可能存在问题,Selenium 找不到在 Chrome 中打开的 PDF 的 Web 元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 Ubuntu Server 上无头运行 Chromedriver 下一篇:如何在 Selenium 中获取 WebElement 的 HTML 代码

                  相关文章

                  最新文章

                      <bdo id='KWast'></bdo><ul id='KWast'></ul>
                    <legend id='KWast'><style id='KWast'><dir id='KWast'><q id='KWast'></q></dir></style></legend>

                  1. <tfoot id='KWast'></tfoot>
                    <i id='KWast'><tr id='KWast'><dt id='KWast'><q id='KWast'><span id='KWast'><b id='KWast'><form id='KWast'><ins id='KWast'></ins><ul id='KWast'></ul><sub id='KWast'></sub></form><legend id='KWast'></legend><bdo id='KWast'><pre id='KWast'><center id='KWast'></center></pre></bdo></b><th id='KWast'></th></span></q></dt></tr></i><div id='KWast'><tfoot id='KWast'></tfoot><dl id='KWast'><fieldset id='KWast'></fieldset></dl></div>

                  2. <small id='KWast'></small><noframes id='KWast'>