playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Feature] Playwright codegen plugin system

Open viktor-silakov opened this issue 1 year ago • 8 comments

Is it possible to create a plugin system so that you can add your own features? Specifically, I need to add a couple of buttons to this panel with an overlay to integrate with my visual testing tool:

image

I studied the sources and managed to do this in the playwright fork by changing several files:

image

But this solution is not very good because it is not extensible and in the future when updating I will not be able to use it.

What are the prospects for creating plugin features?

viktor-silakov avatar Dec 04 '23 08:12 viktor-silakov

Same situation here. My team is seeking more sustainability of testing maintenance, as one way, we plan to use a locator function with fallback logic (for example, nth-child selector -> class selector -> by position -> byText).

For now, one solution is to fork playwright and patch the recorder code, whitch is not good for its stability over long term.

A plugin system maybe a better way to do that

TroubleZjb avatar Mar 07 '24 09:03 TroubleZjb

It would be great if Playwright Codegen allowed external frameworks building on top of Playwright, like Serenity/JS, to generate code using framework-specific syntax.

This should be possible to accomplish if external frameworks were able to register their custom language generators.

I'd be happy to collaborate on this.

jan-molak avatar Apr 09 '24 16:04 jan-molak

My pain over the lack of a plugin system is based on two issues I need to address in my project:

  1. Ability to take screenshots during codgen
  2. Adding some stability improvements like waitForEvent() after the page is opened

This issue is now 6 months old, can you please tell me if this is something you will be working on in the near (2-3 months) future? @mxschmitt tagging you as you placed the badge on my issue above

kotosha-real avatar Jun 15 '24 08:06 kotosha-real

absolutely necessary 🥲🥲

jiwon-mun avatar Jul 02 '24 02:07 jiwon-mun

Yeah I would be like to have the plugin system so to add support for other languages/frameworks that have an integration with Playwright but isn't necessarily supported by Playwright Codegen out of the box.

bhreinb avatar Jul 26 '24 14:07 bhreinb