Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'strict-dynamic'

3,102 views
Skip to first unread message

Roberto A.

unread,
Nov 20, 2019, 12:55:41 PM11/20/19
to ChromeDriver Users
Hello,

When running Python + Selenium + ChromeDriver, I am getting the following error:

Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'strict-dynamic'

Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.

Where exactly would I set this Content Security Policy directive?

Any help would be greatly appreciated.

Thank you.

Roberto

T Crichton

unread,
Nov 20, 2019, 2:20:20 PM11/20/19
to ChromeDriver Users
I believe this is part of the html page itself. The page defines strict-dynamic and all scripts must meet that criteria. These may help you:
Reply all
Reply to author
Forward
0 new messages