web-infra-dev / midscene

An AI-powered automation SDK can control the page, perform assertions, and extract data in JSON format using natural language.
https://midscenejs.com
MIT License
343 stars 8 forks source link

[Feature] Use midscene in other environment #49

Open ducan-ne opened 1 month ago

ducan-ne commented 1 month ago

Currently it seems like midscene depend heavily on nodejs apis (I guess it's about cache), it'd be awesome to bring nodejs uses to an adapter so we can use this library in different environments (for example cloudflare worker, browser, deno deploy) Technically pptr or playwright can work in browser: https://pptr.dev/guides/running-puppeteer-in-extensions

zhoushaw commented 1 month ago

cloudflare worker should not be able to implement libraries such as puppeteer or playwirght, so it will not be able to drive the browser and the midscene capabilities will not be available

ducan-ne commented 1 month ago

@zhoushaw cloudflare worker supports puppeteer about 1 year ago and they have plan to support playwright soon https://github.com/cloudflare/puppeteer

for reference: https://developers.cloudflare.com/browser-rendering/

SunPeter commented 3 weeks ago

@ducan-ne browser extention is on my wishlist