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

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

      <small id='5QXeJ'></small><noframes id='5QXeJ'>

        <legend id='5QXeJ'><style id='5QXeJ'><dir id='5QXeJ'><q id='5QXeJ'></q></dir></style></legend>
      1. <tfoot id='5QXeJ'></tfoot>

        如何在 Selenium 中獲取 WebElement 的 HTML 代碼

        How to get HTML code of a WebElement in Selenium(如何在 Selenium 中獲取 WebElement 的 HTML 代碼)

          <tbody id='yKEmV'></tbody>

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

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

                  本文介紹了如何在 Selenium 中獲取 WebElement 的 HTML 代碼的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我是測試新手,所以如果我的問題聽起來有點初級,我提前道歉.

                  I am new at testing so my apologies in advance if my question sounds a bit primary.

                  我正在使用 Selenium 和 Java 編寫測試.

                  I am using Selenium and Java to write a test.

                  我知道webElement.getAttribute("innerHTML"); 給我帶來了 innerHTML,例如下面的元素:

                  I know that webElement.getAttribute("innerHTML"); brings me the innerHTML, for example for the element below:

                  <a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button" style="position: absolute; border-radius: 0px 0px 4px 4px;">
                      <span class="ui-icon ui-icon-closethick">close</span>
                  </a>
                  

                  它返回:

                  <span class="ui-icon ui-icon-closethick">close</span>
                  

                  但我需要一些能夠為我帶來 WebElement "a" 內部屬性的東西,如下所示:

                  but I need something that brings me the inner attribute of WebElement "a", something like below:

                  href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button" style="position: absolute; border-radius: 0px 0px 4px 4px;"
                  

                  推薦答案

                  如果想要元素本身的HTML,可以使用

                  If you want the HTML of the element itself, you can use

                  webElement.getAttribute("outerHTML");
                  

                  它將返回元素本身的 HTML 以及所有子元素.我不確定這是否正是你想要的.我認為沒有辦法只獲取所選元素的 HTML.

                  It will return the HTML of the element itself plus all the children elements. I'm not sure if that's exactly what you want. I don't think there is a way to just get the HTML of the selected element only.

                  這篇關于如何在 Selenium 中獲取 WebElement 的 HTML 代碼的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='qv5O6'><style id='qv5O6'><dir id='qv5O6'><q id='qv5O6'></q></dir></style></legend>
                      <bdo id='qv5O6'></bdo><ul id='qv5O6'></ul>
                        <tbody id='qv5O6'></tbody>
                          <tfoot id='qv5O6'></tfoot>
                          <i id='qv5O6'><tr id='qv5O6'><dt id='qv5O6'><q id='qv5O6'><span id='qv5O6'><b id='qv5O6'><form id='qv5O6'><ins id='qv5O6'></ins><ul id='qv5O6'></ul><sub id='qv5O6'></sub></form><legend id='qv5O6'></legend><bdo id='qv5O6'><pre id='qv5O6'><center id='qv5O6'></center></pre></bdo></b><th id='qv5O6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qv5O6'><tfoot id='qv5O6'></tfoot><dl id='qv5O6'><fieldset id='qv5O6'></fieldset></dl></div>

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

                            主站蜘蛛池模板: 日韩网站免费观看 | 精品久久亚洲 | 九七午夜剧场福利写真 | 亚洲一区二区三区在线播放 | 欧美在线视频一区 | 成人精品毛片国产亚洲av十九禁 | 91九色视频| 亚洲天堂中文字幕 | 国产精品色哟哟网站 | 成人欧美一区二区三区在线播放 | 国产999精品久久久久久 | 国产高清精品一区二区三区 | 岛国av在线免费观看 | 国产精品区二区三区日本 | 国产精品不卡视频 | 91视频电影 | 久久久做 | 成人日韩| 日韩国产三区 | 在线一区视频 | 国产99久久久国产精品 | 中文在线a在线 | 亚洲永久免费观看 | 色视频在线观看 | 亚洲精品一区二区三区中文字幕 | 欧美精品久久久 | av黄色国产| 91亚洲国产成人久久精品网站 | 狠狠色综合久久丁香婷婷 | 精彩视频一区二区三区 | 亚洲国产中文字幕 | 天天干视频| 欧美综合一区二区三区 | 日韩色视频 | 精品免费国产一区二区三区四区介绍 | av免费成人| 久久久久久艹 | 亚洲免费av一区 | 日韩三级在线观看 | www.精品国产| 日朝毛片 |