【发布时间】:2017-10-17 19:56:00
【问题描述】:
我有一个应用程序,当我单击链接时会生成一个新的浏览器选项卡。在新标签中,我收到 Chrome 身份验证警报。我试过使用下面的代码:
wd.switch_to_window(wd.window_handles[1])
a = switch_to_alert()
a.send_keys('username' + Keys.TAB + 'password')
但我收到无警报错误消息
我也尝试过使用 ActionChain 发送密钥,但警报没有收到 send_keys
还有其他选择吗? 仅供参考,我不能使用https://username@password 格式,因为单击链接时会生成此选项卡
【问题讨论】:
-
能否在您的问题中提供完整的追溯信息?
标签: python google-chrome selenium proxy webdriver