我尝试了
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......
异常。
如何在表格中找到网格?
答案 0 :(得分:0)
等待一会儿页面完全加载怎么办?
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
documents的更多信息
希望它对您有所帮助..