top | item 32940296

Show HN: I Made a Playwright Recorder

2 points| mjgoeke | 3 years ago |github.com

Playwright comes with a recorder, however I had a few killer features I wanted/needed:

  1. I need a repl to execute the "next lines of code" live, either in vscode or the browser.
  Without this I have to restart the entire test to get to the end and try the next line.

  2. I need to be able to configure the selector to match application or lib specific UI pieces
  One-size-fits-all selectors isn't working well for my company's SPA

  3. I need this to generate test code as good as I would write
  This means awareness of the page-object-model, and not just emitting raw selectors into my test
As far as I'm aware these 3 killer features aren't out there in the web automated test world. I tried to find them. When I couldn't I began writing my own. I got the go-ahead from my workplace to continue implementing it, dogfood it, and even have it open sourced and published on npm.

@dnvgl/playwright-live-recorder

feedback appreciated!

1 comment

order

mjgoeke|3 years ago

I'm actively developing this, here's my list of next things:

  * make the tool author new page-object-model files
  * workflow to append to page-object-model files
  * support nested page-object-models better (scope selector)
  * make playwright selectors work both ways (only work one-way right now, generating, not executing)
  * page-object-model patterns flexibility - embellish recorder rules with method parameters
  * add an animated gif to the top of the readme showing usage
  * clean up ui
    * margins/alignment
    * add toggle to show/hide