Web Test Automation Workbook #47: Print Invoice (file download)

Test File Download and verify in Selenium WebDriver

Zhimin Zhan

--

This article is one of the “Web Test Automation Workbook” series (the complete training course will be on my Substack Newsletter), a set of bite-size exercises. (many coaching sessions are still not converted in writing yet, I publish the later ones for experienced automated testers)

Table of Contents:
· Learning Objectives
· Test Case #47
· Test design
· Tasks
Task 1. Verify a file exists
Task 2. To Verify a newly generated file safely
Task 3. Customize Chrome’s download path
Task 4. Ruby’s instance variables and the scope
· Full Test Script

Learning Objectives

  • Design reliable automated tests that are user aware.
  • Customize the Chrome browser to save downloaded files into a specified folder
  • Verify File Exists
  • Awareness of execution side effects: the file already exists
  • Review: "#{variable}/..."

Test Case #47

Test design

  • Login (business): physio@biz.com (password: test01 )
  • Create an invoice (session #46)

--

--