3 Answers, 1 is accepted
0
Hello Pete,
and a standard Test Studio FileUpload dialog handler for the upload step. Please let us know if you have a specific testing scenario we can assist with. All the best,
Byron
the Telerik team
We do not have code samples specific to the RadUpload control. However, recording against a RadUpload control results in a RadControl translator step for the file select button, customized in code as this:
// RadUpload('ctl00_ContentPlaceHolder1_RadUpload1'): input file 0 select
Pages.ASPNETUploadExamples.ContentPlaceHolder1RadUpload1Div.FileSelect(0);
and a standard Test Studio FileUpload dialog handler for the upload step. Please let us know if you have a specific testing scenario we can assist with. All the best,
Byron
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
Myo
Top achievements
Rank 1
answered on 16 Oct 2013, 05:19 AM
Hello Byron,
I tried code step from the link Handling FileUpload Dialogs but not able to compile. Directive or Assembly references are missing for Find.Elements["uploadfile"].GetRectangle() and new Point(-10, 0) suppose to get zero argument but it has two arguments which make compilation errors..
Can we automate as data driven for radupload dialog file selection?
Thanks in advance,
Myo
I tried code step from the link Handling FileUpload Dialogs but not able to compile. Directive or Assembly references are missing for Find.Elements["uploadfile"].GetRectangle() and new Point(-10, 0) suppose to get zero argument but it has two arguments which make compilation errors..
Can we automate as data driven for radupload dialog file selection?
Thanks in advance,
Myo
0
Hi Pete,
I am sorry to hear that you are experiencing this issue.
You can also use the following complete code sample that you can test against a public website:
You should be also able to automate radupload dialog file selection as data driven. If you are using the free Telerik Testing Framework and Visual Studio, you will need to follow their directions for creating a data driven test. If you are using Test Studio you need first to Bind the test to an external data source and then write the code in a coded step:
Regards,
Velin Koychev
Telerik
I am sorry to hear that you are experiencing this issue.
Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
ActiveBrowser.NavigateTo("http://encodable.com/uploaddemo/");
FileUploadDialog x = new FileUploadDialog(ActiveBrowser, @"C:\Test.txt", DialogButton.OPEN);
Manager.DialogMonitor.Start();
Manager.DialogMonitor.AddDialog(x);
HtmlInputFile choose = Find.ById<
HtmlInputFile
>("uploadname1");
choose.MouseClick(MouseClickType.LeftDoubleClick);
x.WaitUntilHandled(10000);
ActiveBrowser.RefreshDomTree();
HtmlInputButton button = Find.ById<
HtmlInputButton
>("uploadbutton");
button.Click();
System.Threading.Thread.Sleep(3000);
Manager.DialogMonitor.Stop();
Manager.DialogMonitor.RemoveDialog(x);
You should be also able to automate radupload dialog file selection as data driven. If you are using the free Telerik Testing Framework and Visual Studio, you will need to follow their directions for creating a data driven test. If you are using Test Studio you need first to Bind the test to an external data source and then write the code in a coded step:
// You can reference the column by index
string fileLocation = (string)Data[0];
// Or by name
string fileLocation2 = (string)Data["Files"];
If you need additional assistance please do not hesitate to contact us and give us more details about your testing scenario.
Regards,
Velin Koychev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings