-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: disable the "allow pasting" warning in chrome devtools #30425
Comments
I wonder if Chrome for Testing fixes this already... |
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. |
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. |
looks like it's already been raised: https://issues.chromium.org/issues/41491762
looks like it does (from the code @mxschmitt linked): protected onPaste(): boolean {
if (Root.Runtime.Runtime.queryParam('isChromeForTesting') || this.selfXssWarningDisabledSetting.get()) {
return false;
}
void this.showSelfXssWarning();
return true;
} and it's documented here: https://developer.chrome.com/blog/self-xss#can_you_disable_it_for_test_automation i tried looking into that maybe it's worth re-opening #23694? |
We've added a Chrome command line flag to disable self-XSS warnings: |
🚀 Feature Request
when opening devtools and attempting to paste something into the console, it doesn't work and the following warning appears:
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.
The text was updated successfully, but these errors were encountered: