Save File
Last updated
Last updated
The Save File action in the Avo Assure is found under the @Generic Element is used [PJ1] to save a file which is opened in the new browser tab to a specified location on the system and stores the result in an output variable.
Input: <FilePath>;<FileName.extn>;<URL>(Optional)
FilePath: This argument used to specify the folder location where the user wants to save their file.
FileName.extn: This argument used to define the file format for saving the specified file (e.g., .pdf, .txt, .xml, etc) (extn: Extension)
URL: Using a URL, it tells the web-based application to get the file from that website.
Output: <Dynamic Variable>(Optional);<Dynamic Variable>(Optional)
Note:
This action is applied only for web app type.
Supported file Formatss: .xml, .txt, .pdf.
Before using the Save File step, the user needs to add the Send Function Keys step to save a file opened in a new tab (e]g., Ctrl+Shift+S for Internet Explorer, Ctrl + S for Chrome and Edge). The user should choose the correct keys for their browser.
A banking application generates monthly account statements in PDF format. During automated testing, when a user requests a statement, the PDF file opens in a new browser tab. The automation script needs to save this PDF locally with a structured name like “Data_2024.pdf,” entered by the user. This helps ensure statements are saved in an organized format, making it easy to verify that each saved statement corresponds to the correct account and month.
Input: In input value provide the correct file path and file name shown as below:
C:\;Data_2024.pdf
Expected Result: It should open the URL and save the “Data_2024.pdf” file with the given name and save it in the specified folder.
Output: The Save File action is stored in the {result} output variable as “True” and saved the file in given location, which can be utilized for display or other purposes.