[Bug]: Browser shows "Do you want to translate" popup
🚀 Feature Request
Prevent display of the translation popup that the playwright UI browser shows if you have a non english language set as your OS language.
Example
Here is a screenshot of the translation popup shown when you have german language set in your OS:
Motivation
Currently I need to click the close button of this popup everytime I open the playwright UI mode.
Danke für deinen Bug-Report, ich schau mir das mal an.
Q: Translate from German? A: Yes, translate to: English
Thanks for your report, i'll take a look.
We're definitely disabling the Translate feature for default chromium instances: https://github.com/microsoft/playwright/blob/8e4627826a6bacdc97582e53ee34a1db4a9647e7/packages/playwright-core/src/server/chromium/chromiumSwitches.ts#L43
But maybe we're not doing this for --ui. This is definitely a bug. What command are you running, what version of Playwright are you on and does this also happen on a fresh Playwright project for you?
This is the command I am using:
npx playwright test --ui --workers=1 --debug
package.json: "@playwright/test": "^1.54.1"
I just checked and the popup does not appear when I start the ui in the todomvc example of the playwright repo. Update: After running the command a few times the translation popup shows up in the example repo also.
Looks like Chromium removed support for disabling the feature: https://chromium-review.googlesource.com/c/chromium/src/+/6578953
There's already an upstream tracking bug: https://issues.chromium.org/issues/429137221
For UI mode, we can work around it with translate=no.
We added translate=no to Playwright's own web UIs, so this popup should no longer appear. I'll still leave this issue open as a tracking issue for the upstream chromium change, since this also affects testing browsers.
I do not quite understand, should this be resolved? Because I get this popup every single time the Playwright Trace Viewer or the Playwright Inspector pops up. So when I use the debug mode, I see this again for every single test.
Looks like it return in version 1.57.0 as adding chrome probably change bit more then expected. Anyway in 1.57.0 version it is the issue and I got impression it was not in 1.56.1.