【发布时间】:2020-04-20 16:57:39
【问题描述】:
我目前正在开发一个登录 instagram 的机器人,我目前有脚本可以登录并打开通知,但是当我弹出一个窗口时,代码没有点击允许。我已经被困了很长一段时间了。预先感谢您的帮助。
def allow_noti():
allow_noti = WebDriverWait(browser, 20).until(EC.element_to_be_clickable((By.XPATH,
"//button[contains(.,'Turn On')]")))
allow_noti.click()
allow_browser = WebDriverWait(browser, 10).until(EC.element_to_be_clickable((By.XPATH, '//*
[text()="Allow"]'))).click()
allow_browser.click()
【问题讨论】:
-
或许可以查看stackoverflow.com/questions/32953498/…中的答案
标签: python-3.x selenium selenium-webdriver