I need to load a page in Firefox selenium and then rewrite the content of the page, It's essential that I use Firefox so Chrome is not an option.
I tried the below code
FirefoxDriver firefoxDriver = new FirefoxDriver(new FirefoxOptions() { AcceptInsecureCertificates = true });
IJavaScriptExecutor javaScriptExecutor = (IJavaScriptExecutor)firefoxDriver;
firefoxDriver.Navigate().GoToUrl("https://www.google.com");
javaScriptExecutor.ExecuteScript("document.write('a');");
But it gives me the error:
OpenQA.Selenium.WebDriverException: 'SecurityError: The operation is insecure.
`
I need to know if there is any option in about:config
or any way to make Firefox run insecure operations.