跳转一个页面,当pyppeteer获取元素时,弹出错误
pyppeteer.errors.NetworkError: Execution context was destroyed, most likely because of a navigation.
当我去网上寻找答案时,添加
await page.waitForNavigation({'timeout': 0})这串代码时
发现程序也不报错,接下来也不执行,一直卡着
while True:
await page.waitForNavigation({'timeout': 0})
a = await page.JJ(".sTabpoint>a")
print(a)
sj1 = int(random.uniform(0, len(a)))
print(sj1)
await a[sj1].click()
a = int(input("是否可以结束当前填写"))
if a == 1:
continue