What if I do need to download the file?

In our previous scenario, we didn't actually need to download the file because we didn't know what the content was supposed to be. Let's extend that scenario. Our product owner has now been provided with the PDFs that need to be downloaded from our website. The legal department has made it very clear to her that, if we serve up the wrong file, there will be legal implications, and that we need to be sure that the correct file is there for every release.

We now have a new requirement: we really do need to download the file and check that the content is correct. So what do we do now? Well, we have a few options; let's take a look at them:

  • Use AutoIt to click on the download dialog
  • Write a Java Robot class to click on the download dialog
  • Get our browser to automatically download files when we click on a link
  • Extend our existing code

Well, we can extend our existing code, but are we going to be writing code for the sake of it? Let's have a look at the alternatives.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.247.31