Skip to content

Latest commit

 

History

History

yaml-scripts-demo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Yaml Scripts

Preparation

Ensure that Node.js is installed. Install the @midscene/cli globally

npm i -g @midscene/cli

Config the API key

# replace by your own
export OPENAI_API_KEY="sk-abcdefghijklmnopqrstuvwxyz"

Run

Run all scripts

midscene ./midscene-scripts/

Extract status info from github status page

midscene ./midscene-scripts/extract-github-status.yaml

Perform a testing case on sauce demo

midscene ./midscene-scripts/sauce-demo.yaml

Perform a search on ebay.com

midscene ./midscene-scripts/search-headphone-on-ebay.yaml

Serve the server_root folder as a static server and test the index.html file

midscene ./midscene-scripts/local-static-server.yml

Debug

Run a script with headed mode (i.e. you can see the browser window when running)

midscene --headed ./midscene-scripts/sauce-demo.yaml

Keep the browser window open after the script finishes

midscene --keep-open ./midscene-scripts/sauce-demo.yaml

Reference

https://midscenejs.com/automate-with-scripts-in-yaml.html