久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='gPCPI'></bdo><ul id='gPCPI'></ul>
  1. <small id='gPCPI'></small><noframes id='gPCPI'>

    <tfoot id='gPCPI'></tfoot>

    <i id='gPCPI'><tr id='gPCPI'><dt id='gPCPI'><q id='gPCPI'><span id='gPCPI'><b id='gPCPI'><form id='gPCPI'><ins id='gPCPI'></ins><ul id='gPCPI'></ul><sub id='gPCPI'></sub></form><legend id='gPCPI'></legend><bdo id='gPCPI'><pre id='gPCPI'><center id='gPCPI'></center></pre></bdo></b><th id='gPCPI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gPCPI'><tfoot id='gPCPI'></tfoot><dl id='gPCPI'><fieldset id='gPCPI'></fieldset></dl></div>

  2. <legend id='gPCPI'><style id='gPCPI'><dir id='gPCPI'><q id='gPCPI'></q></dir></style></legend>

      如何修復未知錯誤:未處理的檢查器錯誤:“找不到

      How to fix unknown error: unhandled inspector error: quot;Cannot find context with specified idquot;(如何修復未知錯誤:未處理的檢查器錯誤:“找不到具有指定 ID 的上下文)
    1. <i id='sp2Kg'><tr id='sp2Kg'><dt id='sp2Kg'><q id='sp2Kg'><span id='sp2Kg'><b id='sp2Kg'><form id='sp2Kg'><ins id='sp2Kg'></ins><ul id='sp2Kg'></ul><sub id='sp2Kg'></sub></form><legend id='sp2Kg'></legend><bdo id='sp2Kg'><pre id='sp2Kg'><center id='sp2Kg'></center></pre></bdo></b><th id='sp2Kg'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='sp2Kg'><tfoot id='sp2Kg'></tfoot><dl id='sp2Kg'><fieldset id='sp2Kg'></fieldset></dl></div>

            • <bdo id='sp2Kg'></bdo><ul id='sp2Kg'></ul>
              <tfoot id='sp2Kg'></tfoot>

              <legend id='sp2Kg'><style id='sp2Kg'><dir id='sp2Kg'><q id='sp2Kg'></q></dir></style></legend>
            • <small id='sp2Kg'></small><noframes id='sp2Kg'>

                  <tbody id='sp2Kg'></tbody>
                本文介紹了如何修復未知錯誤:未處理的檢查器錯誤:“找不到具有指定 ID 的上下文"的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                以下代碼偶爾會拋出 org.openqa.selenium.WebDriverException.

                The following code throws occasionally an org.openqa.selenium.WebDriverException.

                WebElement element = driver.findElement(by);
                element.click();
                (new WebDriverWait(driver, 4, 100)).until(ExpectedConditions.stalenessOf(element));
                

                頁面如下所示(by 是 <a></a> 的選擇器)

                The page looks like this (by is a selector for <a></a>)

                <iframe name="name">
                  <html id="frame">
                    <head>
                      ...
                    </head>
                    <body class="frameA">
                      <table class="table">
                        <tbody>
                          <tr>
                            <td id="83">
                              <a></a>
                            </td>
                          </tr>
                        </tbody>
                      </table>
                    </body>
                  </html>
                </iframe>
                

                消息是 unknown error: unhandled inspector error: {"code":-32000,"message":"Cannot find context with specified id"}.elementiframe 的一部分,單擊會導致 iframe 的內容重新加載.等待時拋出異常.這個異常是什么意思,我該如何解決?

                The message is unknown error: unhandled inspector error: {"code":-32000,"message":"Cannot find context with specified id"}. element is part of an iframe and the click can cause the content of the iframe to reload. The exception is thrown while waiting. What does this exception mean and how could I fix it?

                推薦答案

                這個錯誤信息...

                unknown error: unhandled inspector error: {"code":-32000,"message":"Cannot find context with specified id"}
                

                ...暗示 WebDriver 實例無法找到所需的元素.

                ...implies that the WebDriver instance was unable to locate the desired element.

                正如您在問題中提到的那樣,該元素是 <iframe> 的一部分,并且調用 click() 可能會導致 iframe 的內容在其中重新加載如果您需要遍歷回 defaultContent 并再次使用 WebDriverWait 再次切換回所需的 iframe 然后誘導 WebDriverWait 對于 stalenessOf() 上一個元素或下一個 desired 元素 的存在,如下所示:

                As you mentioned in your question that the element is part of an <iframe> and invoking click() can cause the content of the iframe to reload in that case you need to traverse back to the defaultContent and again switch back again to the desired iframe with WebDriverWait and then induce WebDriverWait either for stalenessOf() previous element or presence of next desired element as follows :

                WebElement element = driver.findElement(by);
                element.click();
                driver.switchTo().defaultContent(); // or driver.switchTo().parentFrame();
                new WebDriverWait(driver, 10).until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.name("xyz")));
                // wait for stalenessOf previous element (visibility of next desired element preferred)
                new WebDriverWait(driver, 4, 100).until(ExpectedConditions.stalenessOf(element));
                // or wait for visibility of next desired element (preferred approach)
                new WebDriverWait(driver, 4, 100).until(ExpectedConditions.visibilityOfElementLocated(next_desired_element));
                

                這篇關于如何修復未知錯誤:未處理的檢查器錯誤:“找不到具有指定 ID 的上下文"的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                How to convert Integer to int?(如何將整數轉換為整數?)
                How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                Inconsistent behavior on java#39;s ==(java的行為不一致==)
                Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)

                  <legend id='ONgnz'><style id='ONgnz'><dir id='ONgnz'><q id='ONgnz'></q></dir></style></legend>
                  <i id='ONgnz'><tr id='ONgnz'><dt id='ONgnz'><q id='ONgnz'><span id='ONgnz'><b id='ONgnz'><form id='ONgnz'><ins id='ONgnz'></ins><ul id='ONgnz'></ul><sub id='ONgnz'></sub></form><legend id='ONgnz'></legend><bdo id='ONgnz'><pre id='ONgnz'><center id='ONgnz'></center></pre></bdo></b><th id='ONgnz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ONgnz'><tfoot id='ONgnz'></tfoot><dl id='ONgnz'><fieldset id='ONgnz'></fieldset></dl></div>

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

                    • <bdo id='ONgnz'></bdo><ul id='ONgnz'></ul>
                          <tfoot id='ONgnz'></tfoot>
                            <tbody id='ONgnz'></tbody>
                        • 主站蜘蛛池模板: 国产精品无码专区在线观看 | 日韩欧美中文在线 | 国产午夜一级 | 亚洲日韩中文字幕 | www.com久久久 | 国产在视频一区二区三区吞精 | 国产欧美精品在线 | 国产一区二区激情视频 | 日韩欧美一区二区在线播放 | 欧美三级成人理伦 | 国产精品不卡 | 国产专区在线 | 中文字幕精品一区久久久久 | 久久精品国产一区二区三区不卡 | 日韩在线中文字幕 | 伊人91在线 | 一区二区三区在线观看视频 | 欧洲国产精品视频 | 日韩中文字幕一区 | 精品伦精品一区二区三区视频 | 精品综合 | 一区二区视频在线 | 一级a性色生活片久久毛片波多野 | 欧美成人免费在线 | 国产在线精品一区二区三区 | 精品久久久久久久久久久久 | 在线观看成人小视频 | 日韩在线视频观看 | 91在线色视频 | 免费成人在线网 | 亚洲精品国产a久久久久久 中文字幕一区二区三区四区五区 | 日韩中文字幕视频在线观看 | 99久久久久久久 | 亚洲va在线va天堂va狼色在线 | 国产精品福利在线 | 国产免费一区二区 | 91视频国产一区 | 亚洲第一天堂 | 亚洲精品视频二区 | 国产精品毛片无码 | 色婷婷av一区二区三区软件 |