簡體   English   中英

如何使用裂片在表格中查找網格?

[英]how to find grids in table using splinter?

我想在表格中找到這樣的元素: 在此處輸入圖片說明

我試過了

b.find_by_id('resourceTd_5897')

b.find_by_css('td#resourceTd_5897.resourceTd')

乃至

b.find_by_tag('td')

他們都提出no elements could be found with......例外的no elements could be found with......

如何在表格中找到網格?

等待一會兒頁面完全加載怎么辦?

from splinter import Browser
b = Browser("chrome")
b.visit("https://splinter.readthedocs.io/en/latest/tutorial.html")

if b.is_element_present_by_xpath("//div[@id='create-a-browser-instance']/h2", wait_time=5):
    # wait until the element's appearing
    print(b.find_by_xpath("//div[@id='create-a-browser-instance']/h2"))

查看更多關於splinter文檔的信息

希望對您有幫助..

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM