Get File Content
Last updated
Was this helpful?
Last updated
Was this helpful?
This is pre-built Action located under the @Generic Element Name. It instructs the Avo Assure Client to get the content from the .txt or .pdf formatted file and save the result in the given output variable.
Input:
For Text: <file path>; <line number>(optional)
Note:
This syntax is for a.txt file where the user needs to provide the file path and line number which will retrieve the content from assigned line number of declared .txt file.
For PDF: <PDF_Filepath>;<pageNumber>; <start string(optional)>;<EndString(optional)>;<image/all/text(optional)>'
This syntax is for .pdf file where user needs to provide file path, page number (from file which page needs to retrieve) of the PDF
If user need more accurate/ exact content then, in above syntax user can add a Starting String (from which it must begin retrieving) and an Ending String (until which it must end)
For Image: When user write ‘image’ in Input syntax it retrieves all images content present on the page within .pdf file.
For All: When user write ‘all’ in Input syntax then it retrieves all content including image and text data from desired page within .pdf file.
Output: <Dynamic Variable>;<Dynamic Variable>(Optional)
Scenario: Testing User Feedback Submission in a Web Application
A web application allows users to submit feedback. The goal is to ensure that the application correctly processes various feedback messages. Input Using the "get content from file" Action, the automation script reads feedback messages from a PDF file containing different scenarios and submits them through the web application.
Expected Result: It needs to retrieve the contents of provided file path and save the resulting content in output variable.
Output: This Action will store the fetched content of the file in {result} Variable, which can be utilized for display or other purposes.