【问题标题】:Is there a ChromeDriver option to turn off redirect blocking?是否有 ChromeDriver 选项可以关闭重定向阻止?
【发布时间】:2018-08-15 11:13:01
【问题描述】:

我正在使用带有 chrome V 68.0.3440.106 的 chrome 驱动程序版本 2.40。
我似乎找不到 chrome 驱动程序选项来启动 chrome 而没有重定向阻止。
已经试过了:

ChromeOptions options = new ChromeOptions();
List<String> switches = new ArrayList<String>();
switches.add("--disable-popup-blocking");
options.addArguments(switches);
ChromeDriver driver = new ChromeDriver(options);

这周突然出现了,我似乎在 ChromeDriver 文档中找不到任何参考:( Example

【问题讨论】:

    标签: java google-chrome selenium selenium-chromedriver


    【解决方案1】:

    我用这个做了同样的隐身

    ChromeOptions options = new ChromeOptions();
    options.addArguments("-incognito");
    options.addArguments("--disable-popup-blocking");
    
    ChromeDriver driver = new ChromeDriver(options);
    

    【讨论】:

    • 添加了隐身标志,它仍然阻止我的重定向:(
    • :) 对我有用。让我找到另一个解决方案
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-30
    • 2022-01-15
    • 2023-04-04
    • 1970-01-01
    相关资源
    最近更新 更多