playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Bug]: Browser shows "Do you want to translate" popup

Open denniske opened this issue 5 months ago • 8 comments

🚀 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:

Image

Motivation

Currently I need to click the close button of this popup everytime I open the playwright UI mode.

denniske avatar Jul 16 '25 13:07 denniske

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.

Skn0tt avatar Jul 16 '25 14:07 Skn0tt

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?

Skn0tt avatar Jul 16 '25 14:07 Skn0tt

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.

denniske avatar Jul 16 '25 14:07 denniske

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

Skn0tt avatar Jul 16 '25 14:07 Skn0tt

For UI mode, we can work around it with translate=no.

Skn0tt avatar Jul 16 '25 15:07 Skn0tt

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.

Skn0tt avatar Jul 24 '25 09:07 Skn0tt

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.

trych avatar Dec 02 '25 10:12 trych

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.

senpl avatar Dec 03 '25 08:12 senpl