【问题标题】:I want to click on "Allow" button in notification popup, instead of blocking pop-up using selenium我想在通知弹出窗口中单击“允许”按钮,而不是使用 selenium 阻止弹出窗口
【发布时间】:2019-09-18 21:08:03
【问题描述】:

下面是弹出窗口的样子:

在启动this URL 时,它会显示一个通知弹出窗口,要求允许或阻止。我想单击“允许”和“阻止”按钮,而不是禁用弹出窗口。

请帮助我如何使用 Java 使用 Selenium Webdriver 来做到这一点

【问题讨论】:

标签: selenium popup


【解决方案1】:
    ChromeOptions options = new ChromeOptions();
    options.addArguments("--disable-notifications");

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多