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.
Figure 13-1 shows a sample file upload page.
Figure 13-1. Sample file upload page
<input type="file" name="document[file]" id="files" size="60"/>
String filePath = @"c:\work\testdata\users.csv"; ...