Closed liutan102 closed 4 years ago
请提供更详细的版本信息和报错:
> pip show poium
Version: 0.6.0
以下代码可以正常运行,例子:
from poium import Page, NewPageElement
from selenium import webdriver
class BaiduIndexPage(Page):
search_input = NewPageElement(name='wd')
driver = webdriver.Chrome()
page = BaiduIndexPage(driver)
page.get("https://www.baidu.com")
att = page.search_input.get_attribute("id")
print("=>", att)
提示: tt = page.wtoip_shangpin.get_attribute('textContent') E AttributeError: 'NoneType' object has no attribute 'get_attribute'