Automating File Uploads
BlinqIO's AI Recorder can detect file upload fields and automate the upload process as part of your test scenarios. This allows you to simulate real-world flows like submitting documents, uploading images, or attaching files in forms.
Prepare Files for Upload
Before recording a scenario that includes a file upload, add the relevant files to your project so the Recorder can access them.
Open your project in VS Code.
NOTE
Refer Open Projects in VSCode guide for detailed steps.
Create the following folder structure inside your project:
bash[your-project-folder]/data/uploads/
Add the files you want to upload (such as
.pdf
,.png
, or.csv
) into theuploads
folder.NOTE
Use clear and consistent filenames to make it easier to manage test data.
Open the Project Manager in BlinqIO and find the files you just added.
Select and upload them to your project using the file upload interface.
NOTE
This step is manual. Make sure the files are placed and uploaded correctly before continuing.
Record the File Upload Step
Once your upload files are in place, follow these steps to record the upload action.
Launch the AI Recorder and start recording a new scenario.
Go to the part of the application that includes a file upload input, such as a profile photo upload or document field.
Click the upload input field (e.g., “Choose File” or “Upload” button) and select a file using the system file picker.
The AI Recorder automatically detects the upload and records it as a dedicated step in the scenario.
Continue recording additional steps as needed to complete your scenario.
NOTE
If the file is currently open or locked by another application, the upload step may fail during test execution. Make sure the file is closed before recording or running the scenario.
Run the Scenario and Check the Upload
When you run the scenario, the AI Recorder reads the file from the uploads
folder and performs the upload during test execution.
The file is uploaded automatically during the corresponding step.