ruifigueira / playwright-crx

Playwright for chrome extensions
Apache License 2.0
81 stars 15 forks source link

Is playwright inspector‘s default language modifiable? #25

Closed adrianna1211 closed 1 month ago

adrianna1211 commented 1 month ago

Hi, is it possible to change default language of the playwright inspector to pytest? image

I love your crx and I believe it can help a lot on improving our efficiency in recording test cases. But our automation project is based pytest and it would be great if there is a way to change the default language to pytest instead of having to manually switch to pytest every time.

I read your code in crxRecorderApp.ts and I'm wondering if I can change the default language by change this line's javascript to python?

    this._onMessage({ type: 'recorderEvent', event: 'fileChanged', params: { file: 'javascript' } });

thx~

ruifigueira commented 1 month ago

Hi Adrianna.

I'll do a configuration option for that, similar to the TestID Attribute Name as described here:

https://github.com/ruifigueira/playwright-crx/releases/tag/v0.5.0

ruifigueira commented 1 month ago

I implemented a new configuration to pick the default recording language:

https://github.com/ruifigueira/playwright-crx/assets/1374559/33af1c42-c0eb-46e7-81e8-27ef81a1cf6a

I'll align its release with playwright 1.45

ruifigueira commented 2 weeks ago

I just released playwright-crx 0.7.1. it now has the ability to pick the default language.

https://github.com/ruifigueira/playwright-crx/releases/tag/v0.7.1