About Article:
This article describes how to access the downloaded file and verifying its content within Virtuoso.
Description:
How to validate the content of the downloaded file in Virtuoso.
Solution:
When a file is downloaded as a result of a test step (e.g., clicking a download link), it is automatically stored in Virtuoso for easy access and validation. The file or its details can be accessed by using two newly created variables:
- LAST_DOWNLOADED_FILE
- LAST_DOWNLOADED_FILE_DETAILS
How to access the properties of a downloaded file :
Steps:
1. Execute the Download Step:
- Perform the test step to download the file (e.g., clicking the "Download" button). The file will be downloaded and stored in the Virtuoso browser.
2. Check Download Details:
- Navigate to the Side Effects tab for this test step to view the details of downloaded files.
- LAST_DOWNLOADED_FILE: Stores the URL of the downloaded file.
- LAST_DOWNLOADED_FILE_DETAILS: Stores the details associated with the downloaded file.
3. Verify File Properties:
- You can verify the filename, size, and length of the downloaded file using the variable $LAST_DOWNLOADED_FILE_DETAILS along with the "Assert" command to ensure the accuracy of all aspects of the downloaded file.
How to validate content in download File.
Steps:
1. Import the ShowPdf Extension:
- Add the ShowPdf extension to the extension manager of your project by clicking the link below and selecting the access level (Project or Organization).
- Extension Link: ShowPdf Extension
2. View Content in the Downloaded File:
- Use the following step to view the content in the downloaded file:
ShowPdf($LAST_DOWNLOADED_FILES)
3. Check for Specific Content:
- Use the "Look" NLP to search for specific content in the file.
Please refer to the example screenshot provided for further clarification on this process.
Comments
0 comments
Please sign in to leave a comment.