© Courtney Zhan, Edited by Zhimin Zhan 2024
Z. Zhan (ed.)Selenium WebDriver Recipes in C#https://doi.org/10.1007/979-8-8688-0023-8_13

13. File Upload and Popup Dialogs

Courtney Zhan1  
(1)
Fitzgibbon, QLD, Australia
 

In this chapter, we will show you how to handle file upload and popup dialogs. Most popup dialogs, such as “Choose file to upload,” are native windows rather than separate browser windows. This can be a challenge for testing because Selenium only drives browsers. If one popup window is not handled properly, test execution will halt.

File Upload

Example File Upload Dialog: See Figure 13-1.

A screenshot of the choose file to upload window. It ...

Get Selenium WebDriver Recipes in C#: Practical Testing Solutions for Selenium WebDriver now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.