问题
I'm trying to change the value of a input with PHP webdriver and PhantomJS. When I run a simple
$driver->executeScript("document.getElementById('changeme').value='".$newvalue."' ;", array());
I get the following error
Refused to evaluate a string as JavaScript because unsafe-eval is not an allowed source of script in the following Content Security Policy directive
I've got the following command line options set
--ignore-ssl-errors=true --web-security=false --ssl-protocol=any
Any suggestions?
来源:https://stackoverflow.com/questions/28593216/phantomjs-unsafe-eval-is-not-an-allowed-source-of-script-in-the-following-co