简体   繁体   中英

how to find grids in table using splinter?

I want to find elements in the table like this: 在此处输入图片说明

I tried

b.find_by_id('resourceTd_5897')

and

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

and even

b.find_by_tag('td')

They all raise no elements could be found with...... exception.

How can I find the grid in the table?

What about waiting a while for page fully loaded.

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"))

see more on splinter documents

hope it helpful ..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM