久久久久久久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>

                            主站蜘蛛池模板: 精精国产视频 | 久久国产99| 精品毛片在线观看 | 久草网站 | 久久久久久91 | 色欧美片视频在线观看 | 99久久精品一区二区成人 | 在线看91 | 天天干天天干 | 日日夜夜精品免费视频 | www.亚洲| 久久不卡视频 | 国产精品视频网站 | 国产精品中文字幕在线播放 | 国产一级淫片a直接免费看 免费a网站 | 亚洲一区二区在线播放 | 欧美在线成人影院 | 成人日b视频 | 亚洲一区在线播放 | 亚洲欧美综合 | 欧美精品欧美精品系列 | 91精品国产91久久久久游泳池 | 精品亚洲一区二区 | 伊人网一区 | 黄网站涩免费蜜桃网站 | 51ⅴ精品国产91久久久久久 | 成人午夜网 | 免费在线性爱视频 | 色婷婷在线视频 | 狠狠干天天干 | 国产一级视频在线 | 亚洲一区二区中文字幕 | 国产目拍亚洲精品99久久精品 | 欧美日韩大片 | 亚洲国产成人在线视频 | 久久精品久久久久久 | 男人天堂网址 | 亚洲综合在线视频 | 国产精品乱码一区二区三区 | 黄网站色大毛片 | 日韩一级欧美一级 |