playwright/packages
Max Schmitt 6d7d37061d
fix(recorder): Locator picker had wrong initial language in language bindings (#27706)
**Description**

When a language port was using Inspector with the "Locator Picker"
feature, it only recognised JavaScript as a language by default. As a
workaround the user was able to click record, interact with the page and
then the language would be correctly used -> csharp e.g. would work in
the "Locator Picker".

**Why?**

Our language bindings are setting `PW_LANG_NAME=<sdkLanguage>` env var
-> good. Our recorder harness also uses this along its internal state
here:


b9b289b641/packages/playwright-core/src/server/recorder.ts (L369)

and it gets used here (no parameter means: we use the first language
aka. primary language):


b9b289b641/packages/playwright-core/src/server/recorder.ts (L95)

The only issue is that the Inspector frontend in the beginning does not
know which language it should use and pass over to the server side, it
then falls back to JavaScript.

**Proposed fix**

Instead of passing it over from the frontend to the server side, we just
always use it from the server side, aka. "currentLanguage". When the
user switches languages in the frontend, "currentLanguage" already gets
updated properly via the "fileChanged" event.

https://github.com/microsoft/playwright-dotnet/issues/2718

---------

Signed-off-by: Max Schmitt <max@schmitt.mx>
2023-10-22 13:02:14 +02:00
..
html-reporter feat(html): "copy to clipboard" for text attachments (#27556) 2023-10-11 17:56:05 -07:00
playwright chore(test runner): do not produce some of the fake skipped test results (#27730) 2023-10-20 17:01:46 -07:00
playwright-browser-chromium chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
playwright-browser-firefox chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
playwright-browser-webkit chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
playwright-chromium chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
playwright-core fix(recorder): Locator picker had wrong initial language in language bindings (#27706) 2023-10-22 13:02:14 +02:00
playwright-ct-core fix(ct): baseURL playwright config (#27689) 2023-10-18 13:53:58 -07:00
playwright-ct-react chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
playwright-ct-react17 chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
playwright-ct-solid fix(ct): solid render array as child (#27715) 2023-10-20 11:44:30 -07:00
playwright-ct-svelte chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
playwright-ct-vue chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
playwright-ct-vue2 chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
playwright-firefox chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
playwright-test chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
playwright-webkit chore: mark 1.40.0-next (#27538) 2023-10-10 16:10:28 -07:00
protocol/src fix: preserve lastModified timestamp in setInputFiles (#27671) 2023-10-18 14:05:09 -07:00
recorder fix(recorder): Locator picker had wrong initial language in language bindings (#27706) 2023-10-22 13:02:14 +02:00
trace/src fix(tracing): bump trace version to V5, migrate V4 traces to consoleMessage.args (#27162) 2023-09-19 16:21:09 -07:00
trace-viewer chore: fix total progress reporting w/ deps (#27716) 2023-10-19 20:07:47 -07:00
web feat(trace): allow navigating from error to source (#27464) 2023-10-05 14:59:59 -07:00
.eslintrc-with-ts-config.js lint: prevent object string concatenation (#23172) 2023-05-19 15:17:43 -07:00
.eslintrc.js chore: replace process.exit with graceful closure (#24242) 2023-07-24 08:29:29 -07:00