如何在硒/python中编辑非硒默认警报弹出窗口?没有这样的警报问题

发布于 2025-02-07 07:55:07 字数 441 浏览 2 评论 0原文

我在弹出窗口中有一个很大的问题,这显然不是硒中的默认警报消息。我已经搜索了所有内容,但是没有解决硒和python问题的解决方案。我寻求帮助。我想编辑并单击以下弹出窗口。

driver.switch_to.alert() does not work. As I said, it is not a selenium alert.

这是错误,它在我使用时显示出来:

驱动程序。

I have a big problem with the pop-up window, which is clearly not a default alert message in selenium. I've searched everything but there is no solution for the selenium and Python problem. I ask for help. I want to edit and click the following popup.

This pop up is not selenium alert

driver.switch_to.alert() does not work. As I said, it is not a selenium alert.

This is error which shows up when I'm using:

driver.switch_to.alert : selenium.common.exceptions.NoAlertPresentException: Message: no such alert

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

擦肩而过的背影 2025-02-14 07:55:07

您是否尝试过- 启动Chrome时禁用default-apps

Have you tried --disable-default-apps when starting up Chrome?

北斗星光 2025-02-14 07:55:07

这是单击左键的Soluton!您需要安装pynput模块!

from pynput.keyboard import Key, Controller

    keyboard = Controller()
    keyboard.press(Key.left)
    keyboard.press(Key.enter)

This is the soluton to click on left button! You need to install the pynput module!

from pynput.keyboard import Key, Controller

    keyboard = Controller()
    keyboard.press(Key.left)
    keyboard.press(Key.enter)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文