How to upload media use loadrunner?
I record the script but it fail because the top of document
is invalidation.How to solve the problem?Which one know the
answer please tell me. Thanks!
Answer Posted / Gangadhar Choudhary
In LoadRunner, make sure you follow these steps when uploading media files:
1. Check if the file type is supported by LoadRunner (e.g., images, PDFs, etc.).
2. Save the media file in a location accessible to LoadRunner.
3. In LoadRunner, open your script and add the following lines at the appropriate place to upload the media file:
```bash
lr_input_parameter("file_path", "string", "/path/to/your/media/file");
lr_input_parameter("file_name", "string", "your_media_file.extension");
lr_save_file(lr_eval("file_path"), lr_eval("file_name"));
```
Replace `/path/to/your/media/file` with the actual file path and `your_media_file.extension` with the file name and extension (e.g., myimage.png).
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers