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

  1. <small id='wKwMZ'></small><noframes id='wKwMZ'>

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

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

    2. 如何通過 Selenium 在 Chrome 上獲取當前活動的標簽

      How to get currently active tab index on Chrome via Selenium?(如何通過 Selenium 在 Chrome 上獲取當前活動的標簽索引?)
      • <i id='Hv4yi'><tr id='Hv4yi'><dt id='Hv4yi'><q id='Hv4yi'><span id='Hv4yi'><b id='Hv4yi'><form id='Hv4yi'><ins id='Hv4yi'></ins><ul id='Hv4yi'></ul><sub id='Hv4yi'></sub></form><legend id='Hv4yi'></legend><bdo id='Hv4yi'><pre id='Hv4yi'><center id='Hv4yi'></center></pre></bdo></b><th id='Hv4yi'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Hv4yi'><tfoot id='Hv4yi'></tfoot><dl id='Hv4yi'><fieldset id='Hv4yi'></fieldset></dl></div>

            <tbody id='Hv4yi'></tbody>

            1. <tfoot id='Hv4yi'></tfoot>

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

              • <bdo id='Hv4yi'></bdo><ul id='Hv4yi'></ul>

                <legend id='Hv4yi'><style id='Hv4yi'><dir id='Hv4yi'><q id='Hv4yi'></q></dir></style></legend>
                本文介紹了如何通過 Selenium 在 Chrome 上獲取當前活動的標簽索引?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我正在創建半自動化的應用程序(用戶正在打開標簽(注意),如果他想轉儲其中一個,他只需點擊熱鍵).

                I'm creating app which is half-automated (user is opening tabs (attention) and if he wants to dump one of them he just clicks hot-key).

                但是當用戶打開很多標簽時,我需要知道我應該切換到哪一個.我如何獲得 currenttab 索引.或者切換到 Selenium C# 上的當前選項卡?

                But when user opens to much tabs, I need to know to which one I should switch. How can i get currenttab index. Or switch to current tab on Selenium C#?

                string windowHandle = Browser.WindowHandles.Last();
                string windowHandle = Browser.WindowHandles.First();
                string windowHandle = Browser.WindowHandles[1];
                

                ...不適合我.

                推薦答案

                每次調用 Browser.WindowHandles() 時,currenttab 索引可能會發生變化.

                The currenttab index may get changed everytime you invoke Browser.WindowHandles().

                雖然一般的看法是 WindowHandles 會像最舊的窗口在前排序,最新的窗口在后.但事實并非如此:它是完全隨機的!

                在一次討論中,西蒙明確提到:

                In a discussion, Simon clearly mentioned:

                雖然用于存儲句柄列表的數據類型可以按插入排序,但 WebDriver 實現迭代窗口句柄以插入它們的順序不需要穩定.順序是任意的.

                While the datatype used for storing the list of handles may be ordered by insertion, the order in which the WebDriver implementation iterates over the window handles to insert them has no requirement to be stable. The ordering is arbitrary.

                此評論與 獲取窗口句柄 它提到的部分:

                This comment is pretty much inline with the Get Window Handles section where it mentioned:

                為了判斷與瀏覽器的特定交互是否打開了新窗口,可以獲取交互執行前的窗口句柄集合,并與執行操作后的集合進行比較.

                In order to determine whether or not a particular interaction with the browser opens a new window, one can obtain the set of window handles before the interaction is performed and compare it with the set after the action is performed.

                您可以在 使用 Selenium 的 WindowHandles 跟蹤和迭代選項卡和窗口的最佳方式

                根據您的評論 用戶切換選項卡(在窗口中)但驅動程序仍專注于另一個選項卡您需要為 numberOfWindowsToBe(n)<誘導 WebDriverWait/code>,您可以在 getWindowHandles() 在 Firefox 58 中不起作用.焦點仍然在父標簽上,不會轉移到下一個標簽

                As per your comment user switch tab (in window) but driver is still focused on another tab you need to induce WebDriverWait for numberOfWindowsToBe(n) and you can find a detailed discussion in getWindowHandles() not working in firefox 58.The focus remains on parent tab and does not transfer to next tab

                這篇關于如何通過 Selenium 在 Chrome 上獲取當前活動的標簽索引?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                相關文檔推薦

                What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                onClick event for Image in Unity(Unity中圖像的onClick事件)
                Running Total C#(運行總 C#)
                Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                Calling A Button OnClick from a function(從函數調用按鈕 OnClick)

                  • <bdo id='w9m6d'></bdo><ul id='w9m6d'></ul>

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

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

                        <legend id='w9m6d'><style id='w9m6d'><dir id='w9m6d'><q id='w9m6d'></q></dir></style></legend>
                            <tbody id='w9m6d'></tbody>
                          主站蜘蛛池模板: av一级在线观看 | av大全在线观看 | 亚洲视频一区 | 久久久久91 | 免费在线黄色av | 免费精品 | 国内精品一区二区 | 国产成人精品一区二 | 欧美日韩国产一区二区三区 | 国产激情一区二区三区 | a级免费观看视频 | 天天操天天拍 | 精品伦精品一区二区三区视频 | 天天草视频 | 91玖玖| 欧美精品一区三区 | av毛片免费 | 一二区视频 | 在线观看成年人视频 | 久草视 | 97日日碰人人模人人澡分享吧 | 国产一区久久久 | 欧美日韩高清免费 | 亚洲九九色 | 全免一级毛片 | 国产成人精品久久二区二区91 | 免费不卡视频 | 国产伊人久久久 | 日韩第一夜 | 久久久精品日本 | 亚洲91| 亚洲精品美女视频 | www.色.com| 波多野结衣精品在线 | 国产成人精品一区二区在线 | 欧美久久一级特黄毛片 | 精品一区二区三区在线播放 | 色伊人 | 精品中文字幕一区二区三区 | 九九免费视频 | 亚洲精品视频一区 |