I’m running into this error sometimes (but not always, oddly) that’s causing my runScript commands to fail:
Refused to execute inline script because it violates the following Content Security Policy directive
What’s strange is I have three Katalon test cases using the exact same JS - two fail with the above error but one of them works fine.
Thank you for using our product.
Were three Katalon test cases executed against the web application? If possible, could you please share the scripts with us - that would help us a lot in debugging? You can send them to firstname.lastname@example.org.
@2620-Alex Just emailed a test script, sorry for the delay. Thanks!
Thank you so much for the test script - we really appreciate your help. We are looking for a solution right now. Technically, it’s possible to overwrite CSP rules with add-ons, but it would be insecure to do that on every web page.
For now, to work around the issue, users can use a third-party add-on (e.g. Disable Content-Security-Policy https://chrome.google.com/webstore/detail/disable-content-security/ieelmcmcagommplceebfedjlakkhpden?hl=en) to disable CSP rules, then execute the test in KR as usual. Don’t forget to disable that add-on when unused.
We’ve added this question to the FAQ #5 https://docs.katalon.com/x/7gHR. Thank you again for you feedback.