New to Telerik Test Studio? Download free 30-day trial

How to Handle the AsyncUpload Dialog

There are differences in how RadAsyncUpload is interpreted across different browsers. AsyncUpload is built over Silverlight in Internet Explorer, but rendered in HTML5 in the other browsers (Firefox, Safari, and Chrome). This greatly affects cross-browser UI Automation. You can work around the problem by using a coded step to handle the dialog:

public void Upload(int index, string filePath)
{
FileUploadDialog uploadDialog = new FileUploadDialog(OwnerBrowser, filePath, DialogButton.OPEN, this.UploadDialogTitle);
Manager.Current.DialogMonitor.AddDialog(uploadDialog);
Manager.Current.DialogMonitor.Start();
this.FileSelect(index);
OwnerBrowser.WaitUntilReady();
uploadDialog.WaitUntilHandled();
Manager.Current.DialogMonitor.Stop();
Manager.Current.DialogMonitor.RemoveDialog(uploadDialog);
}
Public Sub Upload(index As Integer, filePath As String)
    Dim uploadDialog As New FileUploadDialog(OwnerBrowser, filePath, DialogButton.OPEN, Me.UploadDialogTitle)
    Manager.Current.DialogMonitor.AddDialog(uploadDialog)
    Manager.Current.DialogMonitor.Start()
    Me.FileSelect(index) 
    OwnerBrowser.WaitUntilReady()
    uploadDialog.WaitUntilHandled()
    Manager.Current.DialogMonitor.[Stop]()
    Manager.Current.DialogMonitor.RemoveDialog(uploadDialog)
End Sub
In this article