Skip to content

Latest commit

 

History

History
38 lines (34 loc) · 1.82 KB

async-upload-dialog.md

File metadata and controls

38 lines (34 loc) · 1.82 KB
title page_title description previous_url position
AsyncUpload Dialog
AsyncUpload Dialog
Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing.
/user-guide/code-samples/html/handling-radasynchdialog.aspx, /user-guide/code-samples/html/handling-radasynchdialog
1

#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