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

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

  • <tfoot id='GVoIc'></tfoot>
    1. <small id='GVoIc'></small><noframes id='GVoIc'>

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

        如何在 Selenium 中獲得“nth-of-type"

        How to get an #39;nth-of-type#39; in Selenium(如何在 Selenium 中獲得“nth-of-type)

              <tbody id='IQJ5E'></tbody>
            <legend id='IQJ5E'><style id='IQJ5E'><dir id='IQJ5E'><q id='IQJ5E'></q></dir></style></legend>

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

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

                2. 本文介紹了如何在 Selenium 中獲得“nth-of-type"的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在使用 Selenium Webdriver 來檢查這個特定段落的文本(此處以藍色突出顯示的那個):

                  I'm using Selenium Webdriver to check the text of this particular paragraph (the one highlighted in blue here):

                  但我如何查詢"該段落?

                  But how do I 'query' that paragraph?

                  這是我正在嘗試的(不工作):

                  This is what I'm trying (not working):

                      def test_intro_text(self):
                         """Test that intro text is expected text"""
                         container = self.browser.find_element_by_id('visual-17')
                         hed_dek_wrapper = container.find_element_by_class_name('hed-dek-wrapper')
                         intro_text = hed_dek_wrapper.findElement('p:nth-of-type(2)')
                         self.assertIn(
                          'Over the past 20 years, we have seen an evolution.',
                          intro_text.text
                         )
                  

                  我收到此錯誤:AttributeError: 'WebElement' object has no attribute 'findElement'

                  I'm getting this error: AttributeError: 'WebElement' object has no attribute 'findElement'

                  推薦答案

                  findElement() 不是 Python.請嘗試以下方法:

                  findElement() is not a Python. Try below instead:

                  intro_text = hed_dek_wrapper.find_element_by_css_selector('p:nth-of-type(2)')
                  assert 'Over the past 20 years, we have seen an evolution.' in intro_text.text
                  

                  這篇關于如何在 Selenium 中獲得“nth-of-type"的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復導入頂級名稱的情況下構造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發帶有已編譯動態共享庫的 Python 包)

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

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

                            主站蜘蛛池模板: 成人福利在线 | 一级片免费网站 | 免费网站观看www在线观 | 天天看片天天爽 | 韩国精品一区二区 | a级片免费在线观看 | 成人午夜在线视频 | 羞羞的视频在线观看 | 国产精品一区二 | 欧美国产日韩视频 | 欧美性猛交99久久久久99按摩 | 免费网站观看www在线观 | 免费在线成人网 | 精品第一页| 亚洲一区色 | 午夜视频在线 | 久久精品国产亚洲 | 三级免费观看 | 午夜影院| 精品亚洲国产成人av制服丝袜 | 日韩亚洲一区二区 | 一区二区在线视频 | 日本亚洲欧美 | 日本在线天堂 | 性做久久 | 韩日中文字幕 | 能看毛片的网站 | 日韩欧美精品在线 | 亚洲成人精品在线 | 亚洲视频二区 | 日本色视频 | 青青在线视频 | 激情五月综合色婷婷一区二区 | 99视频免费在线观看 | 91精品视频在线 | 黄色片免费看 | 欧美在线视频观看 | 国产在线一区二区 | 黄色一区二区三区 | 在线观看h片 | 九九在线精品 |