[英]Selenium + C# + Chrome WebDriver: Violation of CSP
I am running a console application with Selenium based on C# w/ Chrome webdriver. 我正在使用基于C#w / Chrome Webdriver的Selenium运行控制台应用程序。
When I am runnig it without headless option, in the console windows there are no warnings about CSP. 当我运行无头选项时,在控制台窗口中没有关于CSP的警告。
Running with headless option results in this: 使用无头选项运行会导致以下结果:
Refused to connect to 'https://bla.bla/' because it violates the following Content Security Policy directive
Receiving such a warning every 1-2 secs. 每1-2秒收到一次这样的警告。
How can I disable CSP in that regard, or filter out those messages? 在这方面,如何禁用CSP或过滤掉这些消息?
解决了
options.AddArgument("log-level=3");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.