Closed mbchy closed 8 months ago
Thank you. Yes, those messages should be clearly logged with at minimum "debug" log level. We will change this. For the second part, wait function can be overridden with "Set Wait Function"
Thank you for quick reply @tkoukkari ! I will try monkey patching the wait function. I'm a bit confused though as Open Browser
and Open Window
seem to directly call setup_xhr_monitor()
which tries to inject the script.
Am I getting something wrong here?
Thank you for quick reply @tkoukkari ! I will try monkey patching the wait function. I'm a bit confused though as
Open Browser
andOpen Window
seem to directly callsetup_xhr_monitor()
which tries to inject the script.Am I getting something wrong here?
Try using "Set Wait Function" with something simple first, for example just waiting for few seconds. I think it should not matter if we try to register that monitor on startup if it's not called anymore later. I could be wrong, old code.
Setting wait function seemed to fix the issue for now. I will test this more tomorrow. Thank you 👍
Logging level change was released in 3.2.0.
Description QWeb tries to inject JQuery to web pages. If website has a strict Content Security Policy setting, where injecting 3rd party scripts is not allowed, QWeb fills robot logs with error messages:
The problem seems to lie in setup_xhr_monitor() function defined in QWeb/internal/xhr.py and called from keywords Open Browser and Open Window.
I would propose two possible solutions:
This would be helpful if it is not possible to change the CSP settings of the System Under Test.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Screenshots
System info:
Additional context
About CSP & TrustedTypes:
https://web.dev/articles/trusted-types https://developer.mozilla.org/en-US/docs/Web/API/TrustedScriptURL https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/require-trusted-types-for