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

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

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

      1. Selenium在python中按类名查找元素

        时间:2023-07-04

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

            <tbody id='qo9Gq'></tbody>

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

                1. 本文介绍了Selenium在python中按类名查找元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何过滤具有相同类的元素?

                  How can I filter elements that have the same class?

                  <html>
                    <body>
                      <p class="content">Link1.</p>
                    </body>
                  </html>
                  <html>
                    <body>
                      <p class="content">Link2.</p>
                    </body>
                  </html>
                  

                  推荐答案

                  你可以尝试使用 find_elements_by_class_name:

                  You can try to get the list of all elements with class = "content" by using find_elements_by_class_name:

                  a = driver.find_elements_by_class_name("content")
                  

                  然后您可以点击您要查找的链接.

                  Then you can click on the link that you are looking for.

                  这篇关于Selenium在python中按类名查找元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:接受带有 marionette firefox webdrive python splinter 的 ssl 证书 下一篇:通过 webdriver 点击 javascript 弹出窗口

                  相关文章

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

                2. <i id='da6o5'><tr id='da6o5'><dt id='da6o5'><q id='da6o5'><span id='da6o5'><b id='da6o5'><form id='da6o5'><ins id='da6o5'></ins><ul id='da6o5'></ul><sub id='da6o5'></sub></form><legend id='da6o5'></legend><bdo id='da6o5'><pre id='da6o5'><center id='da6o5'></center></pre></bdo></b><th id='da6o5'></th></span></q></dt></tr></i><div id='da6o5'><tfoot id='da6o5'></tfoot><dl id='da6o5'><fieldset id='da6o5'></fieldset></dl></div>

                    <tfoot id='da6o5'></tfoot>

                      <legend id='da6o5'><style id='da6o5'><dir id='da6o5'><q id='da6o5'></q></dir></style></legend>

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