pyautoTest icon indicating copy to clipboard operation
pyautoTest copied to clipboard

获取不到元素的text

Open Bu1eCat opened this issue 6 years ago • 1 comments

    def test_LoginBySms_Success(self, browser, base_url):
        page = Login_Page(browser)
        print(page.login_success.text)

在selenium 下无法获取元素的text E AttributeError: 'NoneType' object has no attribute 'text'

Bu1eCat avatar Dec 27 '19 08:12 Bu1eCat

用法没错,但不知道你的 login_success 是如何定义的?

defnngj avatar Feb 15 '20 10:02 defnngj