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

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

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

        如何在 Selenium WebDriver 中獲取單個文本節點

        How to get a single text node in Selenium WebDriver(如何在 Selenium WebDriver 中獲取單個文本節點)

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

              <tbody id='aDxbY'></tbody>
            • <bdo id='aDxbY'></bdo><ul id='aDxbY'></ul>
              1. <small id='aDxbY'></small><noframes id='aDxbY'>

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

                  問題描述

                  我想從標簽中獲取文本,但沒有嵌套標簽中的文本.IE.在下面的示例中,我只想從 <small> 標記中獲取字符串 183591 并排除文本 Service Request ID:來自 <span> 標簽.這不是微不足道的,因為 <span> 標記嵌套在 <small> 標記中.這可以通過 WebDriver 和 XPath 實現嗎?

                  I want to get the text from a tag but without the text from nested tags. I.e. in the example below, I only want to get the string 183591 from inside the <small> tag and exclude the text Service Request ID: from the <span> tag. This is not trivial because the <span> tag is nested in the <small> tag. Is this possible with WebDriver and XPath?

                  標簽中的文字每次都會改變.

                  The text in the tag is going to change every time.

                  <div id="claimInfoBox" style="background-color: transparent;">
                  <div class="col-md-3 rhtCol">
                  <div class="cib h530 cntborder">
                  <h4 class="no-margin-bottom">
                  <p>
                  <small style="background-color: transparent;">
                  <span class="text-primary" style="background-color: transparent;">Service Request ID:</span>
                  183591
                  </small>
                  </p>
                  <div class="border-bottom" style="background-color: transparent;"></div>
                  <div id="CIB_PersonalInfo_DisplayMode" class="cib_block">
                  <div id="CIB_PersonalInfo_EditMode" class="cib_block" style="display: none">
                  </div>
                  </div>
                  <script type="text/javascript">
                  </div>
                  </div>
                  

                  推薦答案

                  您將不得不使用字符串操作.比如:

                  You are going to have to use String manipulation. Something like:

                  // you will need to adjust these XPaths to suit your needs
                  String outside = driver.findElement(By.xpath("http://small")).getText();
                  String inside = driver.findElement(By.xpath("http://span")).getText();
                  
                  String edge = outside.replace(inside, "");
                  

                  這篇關于如何在 Selenium WebDriver 中獲取單個文本節點的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  document.write() overwriting the document?(document.write() 覆蓋文檔?)
                  AngularJS Error: Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https(AngularJS 錯誤:跨源請求僅支持協議方案:http、data、chrome-extension、https) - IT屋-程序員軟件開發技術分
                  IE10 and Cross-origin resource sharing (CORS) issues with Image / Canvas(IE10 和 Image/Canvas 的跨域資源共享 (CORS) 問題)
                  Importing script with type=module from local folder causes a CORS issue(從本地文件夾導入 type=module 的腳本會導致 CORS 問題)
                  HTML crossorigin attribute for img tag(img 標簽的 HTML 跨域屬性)

                  • <small id='AxCXC'></small><noframes id='AxCXC'>

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

                      <tfoot id='AxCXC'></tfoot>
                      <legend id='AxCXC'><style id='AxCXC'><dir id='AxCXC'><q id='AxCXC'></q></dir></style></legend>
                          <tbody id='AxCXC'></tbody>
                        <i id='AxCXC'><tr id='AxCXC'><dt id='AxCXC'><q id='AxCXC'><span id='AxCXC'><b id='AxCXC'><form id='AxCXC'><ins id='AxCXC'></ins><ul id='AxCXC'></ul><sub id='AxCXC'></sub></form><legend id='AxCXC'></legend><bdo id='AxCXC'><pre id='AxCXC'><center id='AxCXC'></center></pre></bdo></b><th id='AxCXC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='AxCXC'><tfoot id='AxCXC'></tfoot><dl id='AxCXC'><fieldset id='AxCXC'></fieldset></dl></div>
                          • 主站蜘蛛池模板: h视频在线播放 | 国内精品久久久久久影视8 最新黄色在线观看 | 91精品国产麻豆 | 国产精品一区二区福利视频 | 精品国产一级 | 久久精品国产一区二区三区 | 国产网站在线播放 | 欧美一区视频 | 色综合天天天天做夜夜夜夜做 | 青青久久久 | 麻豆va| 国产亚洲精品久久久久久豆腐 | 97免费在线观看视频 | av中文在线 | 日韩欧美国产一区二区三区 | 成人片网址 | 亚洲精品美女在线观看 | 久产久精国产品 | 一区二区三区视频免费观看 | 国产一区二区三区久久 | 亚洲欧美激情网 | 91久久精品日日躁夜夜躁国产 | 欧美不卡在线 | 日本一区二区不卡 | 青青久久av北条麻妃海外网 | 成人精品在线视频 | 91精品国产高清久久久久久久久 | 99r在线| 国产精品久久毛片av大全日韩 | 精品国产乱码久久久久久影片 | 亚洲 成人 在线 | 视频一区中文字幕 | 日本精a在线观看 | 午夜视频在线 | 色资源在线观看 | 日本人做爰大片免费观看一老师 | 在线观看亚洲专区 | 国产女人与拘做受视频 | 日韩在线小视频 | 欧美一区二区在线视频 | 国产精品欧美日韩 |