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
460 stars 29 forks source link

feat(playwright): optimize the visualization and extraction of playwright ai process data #66

Closed zhoushaw closed 2 months ago

zhoushaw commented 2 months ago

summary

  1. Optimization of playwright ai process visualization

image

  1. Export the generate extract data method to get the data passed to ai
test('ai online order', async ({ ai, page, aiQuery }) => {
  // Generate the extracted data into the test-data folder
  await generateExtractData(page, path.join(__dirname, 'test-data'));
  await ai('Click the language switch button (English, Chinese) in the upper left corner, and click Chinese in the pop-up drop-down list');
});

image

netlify[bot] commented 2 months ago

Deploy Preview for midscene ready!

Name Link
Latest commit 9aeb1ee5c867e03f25a97a38d72e19f97af7aa7b
Latest deploy log https://app.netlify.com/sites/midscene/deploys/66c709ed55956f00087b2e37
Deploy Preview https://deploy-preview-66--midscene.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.