Thank you for contacting us.
As you have noticed Test Studio provides a built-in download dialog handler
which automatically records the download handling. One of the mandatory properties of that download dialog step is the DownloadPath which should be a valid full path where the file will be stored including the name of the file. This property can be also parameterized if using a data source to data drive the test
. That way you can set different name for the file by each test run, if this is a requirement.
Since the file name will be available in the data source. you will be able then to use the same further in the test, for example to verify any data in the downloaded file.
Though, in case the downloaded files from each test can be overwritten, you still can use a static DownloadPpath to the file and leave the name of the file to be a static one - the built-in handler is designed to confirm the Overwrite prompt. Since you reported you experienced some issues with that, can you please prepare a sample test which demonstrates the troubles you have faced? If you can record the test against a public accessible page I will be able to test it on my end and verify what the outcome will be.
Please, if this is the case, let me know the following details:
- which is the browser you use to execute the test
- which is the version of the browser
- which is the version of the Test Studio extension enabled in the browser (for Chrome and Firefox)
- which is the version of Test Studio in use
Once we sort out what the trouble with the Download dialog might be, you can proceed with the other requirement to verify some data in the downloaded excel file in a coded step, as you suggested. Here
is a sample article you can use for reference - although it demonstrates how you can write into an excel file, it still can be used as a starting point how to locate the file and read from it. This additional MSDN forum post
will be useful how to design the custom solution to read from the file.
I hope the above notes will be useful for you. Though, in case of any questions, please let me know.