File downloads with Selenium
At some point in your career, you are probably going to work with a website that allows the user to download something. There are many different types of things that may be downloadable. The most common things are probably:
- PDF files
- Pictures (PNG, JPG, and GIF)
- Archives
- Installers
When you are working on a site that allows you to download files of some type, you will be expected to test that this functionality works and, at some point, the idea of writing some automated checks for this functionality will probably come up.
The scenario
You are working in a small, agile team and are in a pre-planning session with your tech lead, business analyst, and product owner. The product owner would like to give your users some new functionality that enables them to download PDFs from the website that you are working on. These PDFs are going to have legal terms and conditions in them to satisfy statutory requirements, so it is important that they are available. If they are not...