简体   繁体   中英

Selenium + C# + Chrome WebDriver: Violation of CSP

I am running a console application with Selenium based on C# w/ Chrome webdriver.

When I am runnig it without headless option, in the console windows there are no warnings about 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.

How can I disable CSP in that regard, or filter out those messages?

解决了

options.AddArgument("log-level=3");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM