-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Support importing behaviors from the new Chrome dev tools Recorder panel JSON export format #283
Comments
@pirate thanks for sharing this, potentially exciting that there is a standalone JSON format that's not tied to puppeteer. I wonder if there is a spec for it. There's potentially a few different paths:
Very curious about the customization possibility that exists for "Get Extensions". |
I just opened an issue in the main playwright repo: microsoft/playwright#22345 I'd give them a few weeks to respond before doing anything to add it to browsertrix-crawler, I'd be very surprised if it takes more than a few months for someone to contribute this to playwright given how useful it would be.
Yeah here's the docs on extensions and extending Recorder functionality:
Here's an example Chrome extension that implements a custom conversion that's available built into the Dev Tools panel export menu: https://github.com/kobenguyent/codeceptjs-chrome-recorder/blob/main/src/main.ts (Landing native Browsertrix Behavior export from Chrome dev tools would be awesome with an extension like this) |
Should also evaluate the general applicability of this, beyond a single page. In some ways, this is similar to what Memento Tracer was trying to do. The overall behavior system is still probably the more general solution, but this might be a useful subset that can be supported within that. |
Chrome recently added in v101 a new framework-agnostic JSON user script export format for their Recording pane.
https://developer.chrome.com/docs/devtools/recorder/reference/#export-flows
It used to only support generating puppeteer JS scripts, but now with the JSON format it can be imported into a wide variety of tools without needing to translate puppeteer JS scripts into playwright/other drivers.
Here's a sample of the JSON format they generate:
(honestly I recommend
opening an issue upstream(done: microsoft/playwright#22345) to add this JSON importing feature to playwright, many people will likely want this)Replaying docs for playwright where it would be documented if added: https://playwright.dev/docs/next/network#record-and-replay-requests
Chrome docs where it would be documented if playwright added support for replaying this JSON: https://developer.chrome.com/docs/devtools/recorder/reference/#replay-with-external-libraries
The text was updated successfully, but these errors were encountered: