【发布时间】:2020-01-12 16:25:29
【问题描述】:
我正在使用基于 C# 和 Chrome webdriver 的 Selenium 运行控制台应用程序。
当我在没有无头选项的情况下运行它时,在控制台窗口中没有关于 CSP 的警告。
使用无头选项运行会导致:
Refused to connect to 'https://bla.bla/' because it violates the following Content Security Policy directive
每 1-2 秒收到一次这样的警告。
如何在这方面禁用 CSP,或过滤掉这些消息?
【问题讨论】:
标签: c# selenium google-chrome webdriver