-
Notifications
You must be signed in to change notification settings - Fork 803
feat(web-integration): implement file upload functionality with tests and HTML fixture #1709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… and HTML fixture
✅ Deploy Preview for midscene ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…meters and examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements file upload functionality for web automation testing, adding a new aiUploadFile action method that allows uploading single or multiple files to web pages through Puppeteer and Playwright interfaces.
- Adds
aiUploadFilemethod to the Agent API for uploading files via natural language element location - Implements uploadFile functionality in base page classes for Puppeteer and Playwright with file path validation
- Includes comprehensive test coverage for single file, multiple files, and error scenarios
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/agent/agent.ts | Adds aiUploadFile method to Agent class for file upload functionality |
| packages/core/src/device/index.ts | Defines UploadFile action schema and type definitions |
| packages/web-integration/src/web-page.ts | Registers UploadFile action in the common web actions |
| packages/web-integration/src/puppeteer/base-page.ts | Implements uploadFile method with file validation for both Puppeteer and Playwright |
| packages/web-integration/src/playwright/ai-fixture.ts | Adds aiUploadFile fixture for Playwright test integration |
| packages/web-integration/src/chrome-extension/page.ts | Adds uploadFile stub that throws descriptive error for unsupported Chrome Extension mode |
| packages/web-integration/tests/ai/web/puppeteer/file-upload.test.ts | Adds Puppeteer test suite for file upload scenarios |
| packages/web-integration/tests/ai/web/playwright/file-upload.spec.ts | Adds Playwright test suite for file upload scenarios |
| packages/web-integration/tests/ai/fixtures/file-upload.html | Provides HTML fixture for testing file upload interactions |
| packages/web-integration/tests/ai/fixtures/test-file*.txt | Adds test file fixtures for upload testing |
| apps/site/docs/en/api.mdx | Documents aiUploadFile API with examples in English |
| apps/site/docs/zh/api.mdx | Documents aiUploadFile API with examples in Chinese |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/web-integration/tests/ai/web/playwright/file-upload.spec.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/web-integration/tests/ai/web/puppeteer/file-upload.test.ts
Outdated
Show resolved
Hide resolved
packages/web-integration/tests/ai/web/playwright/file-upload.spec.ts
Outdated
Show resolved
Hide resolved
packages/web-integration/tests/ai/web/puppeteer/file-upload.test.ts
Outdated
Show resolved
Hide resolved
packages/web-integration/tests/ai/web/playwright/file-upload.spec.ts
Outdated
Show resolved
Hide resolved
…pec.ts Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* refactor(core): update the implementation of file uploader * refactor(core): update the implementation of file uploader * refactor(core): rename params
This reverts commit 2ea8890.
* refactor(core): update the implementation of file uploader * refactor(core): update the implementation of file uploader * refactor(core): rename params * docs(core): update aiAct * refactor(core): update the implementation of file uploader
No description provided.