Skip to content

Commit e961ddf

Browse files
committed
feat: evaluate js in yaml
1 parent aa4d4a7 commit e961ddf

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

puppeteer-demo/demo.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ Promise.resolve(
4141
// 👀 assert by AI
4242
await agent.aiAssert("There is a category filter on the left");
4343

44+
// 👀 click on the first item
45+
await agent.aiTap("the first item in the list");
46+
4447
await browser.close();
4548
})()
4649
);

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ tasks:
1515
{name: string, price: number, actionBtnName: string}[], return item name, price and the action button name on the lower right corner of each item (like 'Remove')
1616
name: items
1717
- aiAssert: The price of 'Sauce Labs Fleece Jacket' is 49.99
18+
19+
- name: run javascript code
20+
flow:
21+
- javascript: >
22+
document.title
23+
name: page-title

0 commit comments

Comments
 (0)