gpt4 book ai didi

testing - 使用 selenium 的对话框操作

转载 作者:行者123 更新时间:2023-11-28 20:31:31 25 4
gpt4 key购买 nike

在我的 webapp 中发布信息后,我得到这个警告对话框

“虽然此页面已加密,但您输入的信息将通过未加密的连接发送,并且很容易被第三方读取。

您确定要继续吗?

      <button> Continue         <button> Cancel

如何使用 selenium 选择“继续”。已经尝试了 Conformation 和 alert,但没有用。

最佳答案

如果它是一个窗口对话框使用下面的代码

Alert alert = driver.switchTo().alert();
alert.accept();

希望对你有帮助

关于testing - 使用 selenium 的对话框操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21524483/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com