Upload a single file
Medium70 pts
- File upload
- sendKeys
Practice app · Document Vault
File upload and download, cookies, localStorage, sessionStorage and JavaScript execution.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Upload a file through the single file input without touching the operating system dialog.
Your Task
- 1Create a temporary file named tqa-upload.txt with any text content.
- 2Send its absolute path to #file-upload with sendKeys.
- 3Click #upload-button.
- 4Assert #uploaded-files lists exactly one item containing “tqa-upload.txt”.
Validation Checks
- The path is sent with sendKeys
- #uploaded-files lists tqa-upload.txt
- At least 1 assertion passes
Selenium WebDriver 4 · Selenium Practice Track · Files, windows & storage