Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josepedrodias/puppetmaster
drive multiple puppeteer controlled browsers with ease
https://github.com/josepedrodias/puppetmaster
automation multiplayer puppeteer
Last synced: 16 days ago
JSON representation
drive multiple puppeteer controlled browsers with ease
- Host: GitHub
- URL: https://github.com/josepedrodias/puppetmaster
- Owner: JosePedroDias
- Created: 2024-06-14T18:42:24.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-16T21:15:43.000Z (5 months ago)
- Last Synced: 2024-12-23T01:14:50.382Z (16 days ago)
- Topics: automation, multiplayer, puppeteer
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Puppet Master
The purpose of this project is to offer a simple way to trigger multiple browser clients to behave in a coherent manner. Usages of it are multiplayer games, but it can also be useful on other collaborative or competitive tasks.
You're expected to pass 3 parameters to the puppetmaster:
- the number of browser windows/clients to spawn
- the configuration each should use to start
- a set of puppeteer actions that are to be called from each browser's page object. This function receives the browser index so they can differ in behavior.The puppetmaster also returns the array of pages. This allows for an outside orchestrator to affect those pages, if need be.
If you need the browser profiles to be reset at app start, uncomment the `rm` command commented out that main.mjs's main function.
Tested on OSX only.
## Reference
- https://pptr.dev/api/puppeteer.page