Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Puppeteer Demo

This is a demo to show how to use Puppeteer to do some automation tasks.

If you want to use Puppeteer with Vitest, please refer to puppeteer-with-vitest-demo.

Steps

Preparation

create .env file

# Replace with your own API key
MIDSCENE_MODEL_BASE_URL="https://.../compatible-mode/v1"
MIDSCENE_MODEL_API_KEY="sk-abcdefghijklmnopqrstuvwxyz"
MIDSCENE_MODEL_NAME="qwen3-vl-plus"
MIDSCENE_MODEL_FAMILY="qwen3-vl"

Refer to this document if your want to use other models like Qwen: https://midscenejs.com/model-strategy.html

Run demo

npm install
# Puppeteer needs download a compatible Chrome
npx puppeteer browsers install chrome
# run demo.ts
npx tsx demo.ts

# run extract-data.ts
npx tsx extract-data.ts

# run demo with a `.runYaml` call
npx tsx demo-run-yaml.ts

Reference

https://midscenejs.com/integrate-with-puppeteer.html https://midscenejs.com/api.html