You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: disable the "allow pasting" warning in chrome devtools #30425
when opening devtools and attempting to paste something into the console, it doesn't work and the following warning appears:
Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yourself. This could allow attackers to steal your identity or take control of your computer. Please type ‘allow pasting’ below and hit Enter to allow pasting.
it would be nice if playwright could automatically disable this protection. i wasn't able to find any chrome arguments to disable it though
Example
No response
Motivation
this warning is intended to protect end users who are not programmers from being scammed, so it's not relevant to playwright users at all, who often need to paste selectors and other code snippets into the console when debugging their tests.
Reacted by KotlinIsland, Arthur, Hector Quiles, Subhasish Das, Nox, Boris Sotsky and Ingo Steinke
Please file this issue in Chromium repository, they could probably add a flag to disable the warning (and clients such as playwright could pass it) or just disable the warning when browser is controlled by automation client.
Please file this issue in Chromium repository, they could probably add a flag to disable the warning (and clients such as playwright could pass it) or just disable the warning when browser is controlled by automation client.
Activity
KotlinIsland commentedon Apr 19, 2024
I wonder if Chrome for Testing fixes this already...
yury-s commentedon Apr 19, 2024
Please file this issue in Chromium repository, they could probably add a flag to disable the warning (and clients such as playwright could pass it) or just disable the warning when browser is controlled by automation client.
mxschmitt commentedon Apr 19, 2024
I asked where it was implemented: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5352652/comment/8c39f546_506c4201/
We can try filing a bug with the suggestion from the comment if they are up for it.
DetachHead commentedon Apr 21, 2024
looks like it's already been raised: https://issues.chromium.org/issues/41491762
looks like it does (from the code Max Schmitt (@mxschmitt) linked):
and it's documented here: https://developer.chrome.com/blog/self-xss#can_you_disable_it_for_test_automation
i tried looking into that
selfXssWarningDisabledSettingsetting, but as far as i can tell there's no way to set that in the chrome flags.maybe it's worth re-opening #23694?
wolfib commentedon May 2, 2024
We've added a Chrome command line flag to disable self-XSS warnings:
--unsafely-disable-devtools-self-xss-warnings(https://crbug.com/41491762 for details)fix(chromium): allow pasting in DevTools without self-xss warning (#3…