-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Support replaying Chrome Dev Tools Recorder panel's new JSON session recording format #22345
Comments
From our experience our recorder is much more powerful than third-party recorders since its optimised for Playwright. Do you miss functionality from our recorder? Then feel free to file a feature request for it! It also creates human readable Playwright scripts for all our languages out of the box. Since providing a separate recorder generator integration is outside of the scope for the Playwright project, I'm closing it for now. If you are interested in writing a code generator for this Chrome file format, this can also be done as a third-party project. |
I believe the intent of this JSON export feature is to create a tool-agnostic format that many replayers can share. I think right now the entire browser automation ecosystem is burdened by having to translate each other's crowd-sourced python/js/etc. user scripts between languages and environments like puppeteer/selenium/playwright. The power of the tool-agnostic JSON format is that it's just the raw data needed, with none of the language-specific things required like imports, JS IIFE async setup, variable declaration lines, etc. that you'd have to translate. I think Playwright is the best browser driver by far and is likely to win out, and I definitely appreciate the focus being on improving playwright's recording before implementing import/export stuff. From a bigger picture perspective it might still benefit the whole ecosystem to move away from code-generated imperative JS scripts and move towards a flat declarative data format. I see this as an olive branch from the Chromium team to start this process. (They could've released a proprietary format designed to encourage Chrome+puppeteer but it seems to be very flat and tool agnostic to encourage interop.) I understand if playwright doesn't want to jump on board immediately, but I'd encourage revisiting this idea in 6 months if this new JSON takes off and ends up becoming a common interchange format for user flows. |
It would enable non tech savy people to record "user-interactions" without setting up a coding environment, so really powerful to bring people onboard who else wouldn't have the chance to contribute. So any plans in that regard? I know there is:
but some random extension is a different story than official support |
It's been a little while now @mxschmitt, any chance we could get ya'll to reconsider supporting a JSON/declarative user scripting interchange format? I think it would bring together the contributor pools from many projects if we could all exchange user scrips in a standardized, tool-agnostic format. There's such a wide range of browser automation tools right now, but so many have created their own recorders + recording formats + user script repositories. We could get the pools of thousands of users and contributors across these projects sharing scripts, and it might even increase Playwright's adoption if people are no longer locked in to older Puppeteer/Selenium scripts as a sharing standard:
I'd also be willing to personally contribute towards PRs to support this format if I know it's a possibility, as I know it takes real work and I don't want to just ask ya'll to implement this for free on your own. Also to clarify: my intent for my own use in Archivebox would be to extend the JSON format with provisions for executing arbitrary JS, performing browser actions like taking a screenshot/PDF, etc. The JSON format just serves as a declarative base that can be extended by other tools without breaking cross-compatibility. |
This feature would have a huge positive impact on the whole web archiving industry. |
Just jumping in on the JSON/declarative script format discussion. Adding this to Playwright would be a game-changer. It'll let us swap scripts easily across different tools like Puppeteer and Selenium. Think about it - no more juggling different formats for each tool. We'd have a universal language for browser scripts! This isn't just about making our lives easier (though it definitely will). It's about bringing together the browser automation community. More shared scripts mean more innovation and faster progress for everyone. Plus, it could make Playwright the go-to for people currently using other tools. I'm up for helping out with this. I know it's a big ask, and I'm ready to pitch in with the work. |
Hello @mxschmitt you wrote
In some companies installing a tool like playwright is quite a hassle (for example playwright is not available as a package in Microsoft Intune / Configuration Manager therefore the help desk must manually support the installation). External Contractors have to use Virtual Desktop Infrastructure (VDI). Some corporations refuse to install "exotic" software on a VDI. The benefit of using the built in recorder (of msft edge and or google chrome) is that a these browsers are already available on most corporate computers.
In the devtools recorder the recorded click path is displayed with screens and can be replayed. If the playwright ui-mode GUI |
Chrome added the
Recorder
panel to the Dev Tools in release v92, which provides an amazing UI for recording and editing puppeteer-style user flow scripts straight from the browser.It used to only support exporting the user actions script as an autogenerated puppeteer JS script, but they recently added a more framework-agnostic JSON format in the v101 release that looks like this:
Feature Request
Would the be useful to many people?
I think it will help massively reduce complexity in the ecosystem as tools will no longer need to provide a multitude of output format options to support exporting to puppeteer/pyppeteer/playwright/selenium/etc.. One common format to rule them all could be super helpful for everyone.
HAR/WARC/WACZ files plus these JSON files could then be shipped around as a complete unit needed to reproduce an entire interactive browsing session in a variety of replay tools. (I'd like to add this to to the internet archiving tool I maintain, ArchiveBox: ArchiveBox/ArchiveBox#51, and my friends over at browsertrix-crawler want it too: webrecorder/browsertrix-crawler#283)
JSON User Flow Format Example
Demo URL: https://jec.fyi/demo/recorder
Steps to reproduce in Chrome:
View > Developer > Developer Tools > Recorder > Create a new recording > ⏺️ Start recording > ⏹️ End recording > ⬇️ Export > JSON
More Info
Release announcements for the
Recorder
pane andExport
menuReference docs about
Recorder
pane and theExport
menu formatsThe text was updated successfully, but these errors were encountered: