【发布时间】:2021-06-04 00:25:40
【问题描述】:
我想使用Except TimeoutError 来处理超时问题。但是脚本总是给我一个 TimeoutError,而不是按我的计划打印消息。
这是我的代码:
try:
await page.wait_for_selector("#winiframe_main", timeout=10000, state='detached')
print("The frame is detached.")
except TimeoutError:
print("The frame is not detached")
我的代码有什么问题吗?
【问题讨论】:
标签: exception playwright-python