We have a process which creates a report file ready for downloading as a xlsx file when the user clicks the Save button
I want to view and verify the contents of this file as part of a selenium regression test.
The html for the button is
<a class="n-pad btn" download="test-report" href="blob:https://www.testurl.co.uk/9fe176ea-d339-46eb-ac46-95bf300520e5">
<span class="icon-cp-download"></span>
<span>Save</span>
</a>
And I would like to read the file at this point, can anyone advise of the best method to achieve this please.
Thanks
2
Answers
So we have a way round this
By setting the download path to "C:agent_work1s" the tests are able to locate and read thje downloaded reports.
Cool or what...
Based on your question you want to read an excel file(xlsx). the best way to read the contents of it is to use package called ExcelDataReader. install it in your nuget package. it is free and open source.
get excel sheet row id using exceldatareader into dataset
or use this code as an example.
If does not work,