This is a migrated thread and some comments may be shown as answers.

File Upload Issue

2 Answers 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sudarshan
Top achievements
Rank 2
Sudarshan asked on 05 Apr 2013, 11:06 AM
Hi,

How to upload a file? I have attached a pic showing the scenario. On clicking upload photo a window opens, how to give the File name in that text box?
Thanks
Sudarshan 

2 Answers, 1 is accepted

Sort by
0
Accepted
Boyan Boev
Telerik team
answered on 05 Apr 2013, 12:47 PM
Hi Sudarshan,

Please try out this code:

using ArtOfTest.WebAii.Win32.Dialogs;


FileUploadDialog 
dialog = new FileUploadDialog(ActiveBrowser, @"PathToYourPhoto", DialogButton.OPEN);
Manager.DialogMonitor.Start();
Manager.DialogMonitor.AddDialog(dialog);
Button.Click(); //Click on the upload photo button.  
dialog.WaitUntilHandled(10000);
 
I recorded a short video as a demonstration.

Let me know if this helps.

Kind regards,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Sudarshan
Top achievements
Rank 2
answered on 08 Apr 2013, 01:28 PM
Hi,

It worked. Thank u for the continued support.

Thanks 
Sudarshan
Tags
General Discussions
Asked by
Sudarshan
Top achievements
Rank 2
Answers by
Boyan Boev
Telerik team
Sudarshan
Top achievements
Rank 2
Share this question
or