I use Robot Framework.
On my HTML page I have a simple button. When you click on it, it downloads a pdf file.
How can I check with Robot Framework if the fil
${home_dir} Get Environment Variable HOME
${download_dir} Join Path ${home_dir} Downloads
${result} Run Keyword And Return Status File Should Exist
${download_dir}/filename.pdf
To check further on the file ${content} Get File ${download_dir}/filename.pdf ${count_file} Get Line Count ${content}
Above can be used for basic assertion For more keywords please check the link http://robotframework.org/robotframework/latest/libraries/OperatingSystem.html