I\'m trying to relax Chrome\'s CSP while running a test using proctractor (webdriver, chromedriver).
So the solution can be either
I update @ewwink's answer
var isCSPDisabled = function (tabId) {
return true; // disabledTabIds.includes(tabId);
};
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_extension("/path/to/chrome-csp-disable-master.crx")
driver = webdriver.Chrome(executable_path="/path/to/chromedriver", options=chrome_options)
driver.get("https://www.google.com/")
source: Load chrome extension using selenium