In this chapter, I show you how to handle file upload and popup dialog boxes. Most pop-up dialog boxes, such as Choose File to Upload, are native windows rather than browser windows. This would be a challenge for testing, as Selenium only drives browsers. If one pop-up window is not handled properly, test execution will be halted.

File upload

Figure 13-1 shows a sample file upload page.


Figure 13-1. Sample file upload page

Get Selenium WebDriver Recipes in C#, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.