V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
yellowtail
V2EX  ›  问与答

Python 调试相关问题求助,感谢。。。

  •  
  •   yellowtail · Oct 30, 2019 · 1278 views
    This topic created in 2376 days ago, the information mentioned may be changed or developed.

    try: while (driver.find_element_by_xpath("/html/body/div[2]/div/div/div/div/button").text) == "点击按钮进行验证": print("当前需要验证码",time.time()) time.sleep(10) except NoSuchElementException as e: print("except",e)

    程序运行报错的内容是 Nosuchlelementexception 但是最后还是提示 name 'NoSuchElementException' is not defined

    求解惑。。。

    1 replies    2020-02-27 10:46:47 +08:00
    yellowtail
        1
    yellowtail  
    OP
       Feb 27, 2020
    网速没程序运行快,应该是因为检测元素时元素未下载
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2283 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 01:15 · PVG 09:15 · LAX 18:15 · JFK 21:15
    ♥ Do have faith in what you're doing.