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

[Solved] RadUpload - Getting an exception while automating upload of a csv file.

9 Answers 56 Views
Silverlight WebAii RadControls
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Maadhavi
Top achievements
Rank 1
Maadhavi asked on 28 Oct 2009, 07:23 PM
Hi,

I am getting "Handler not found or execution of handler failed" exception while trying to automate upload of a .csv file in the following loaction from the XamlSampleTests.
http://demos.telerik.com/silverlight/beta/TestPage.aspx#Upload/FirstLook

Kindly let me know if i am missing something.

Thank you,
Maadhavi

9 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 28 Oct 2009, 07:30 PM
Hello Maadhavi,

Do you upload the file successfully manually?

Also, can you please share the test that fails along with a screen shot of the error dialog?

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Maadhavi
Top achievements
Rank 1
answered on 28 Oct 2009, 07:46 PM
Hi Konstantin,

The exception occurred when i tried to upload manually also, I attached the screen shot. I was trying to automate upload of csv file for our application and the automation gets stuck at the loading stage and fail due to TimeoutException.

Here are the few lines of code from my test:

 

app.Find.ByName<

Button>("uploadNew").User.Click();

 

upload = app.FindName<

RadUpload>("radUploadCtrl");

 

 

upload.UploadFile("C:\\test",true);

It navigates to test, selects it and hangs. Let me know if you need any other information.

Thank you for quick response.

Regards,
Maadhavi

 

0
Konstantin Petkov
Telerik team
answered on 28 Oct 2009, 09:17 PM
Hi Maadhavi,

Automation doesn't change control behavior, it just automates the repetitive scenarios.

Let me discuss the .csv file upload problem with the devs here and we will get back to you.

Best wishes,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Konstantin Petkov
Telerik team
answered on 29 Oct 2009, 01:27 PM
Hi Maadhavi,

It seems the error may happen in case of invalid file path or an empty file. Looking at your code you pasted here the filePath argument of the UploadFile() method may be incomplete. Can you please make sure the passed argument includes the file name, e.g: C:\\TestDir\\TestFile.csv

Since you shared you reproduce that manually though, please make sure the file size falls within the set limit in the demo. You can see the MaxFileSize input at the configurator at right of the demo. Also (again), please make sure the file is not empty.

Please let us know about your findings.

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Maadhavi
Top achievements
Rank 1
answered on 29 Oct 2009, 02:40 PM
Hi Konstantin,

My csv file size which i am trying to upload manually is 1kb and the its not empty. I am not sure why it shows 162 B when i try to upload manually on the UI. Also i get the same exception when i try to upload .xls or .xlsx files and i am sure the files are not empty and are within the max allowed size. I have attached screen shot of the same for your reference.

Thanks,
Maadhavi
0
Maadhavi
Top achievements
Rank 1
answered on 29 Oct 2009, 05:09 PM
Hi Konstantin,

when i try to automate upload of a csv file located at "C:\\test1" it browses for the file, selects the file, displays loading and hangs.
The input file is not empty and also since it selects the file the location is also correct.  Here is the code for the same

LaunchInitialize(

"Navigates to our application");

 

 

this.tabControl = app.FindName<RadTabControl>("mainRegion");

 

 

RadTabItem home = tabControl.TabItems[0],

 

mySpend = tabControl.TabItems[1];

 

Assert.IsTrue(home.IsSelected, "Home tab is selected.");

 

 

Assert.IsFalse(mySpend.IsSelected, "MySpend should not be selected.");

 

mySpend.Select();

 

Assert.IsTrue(mySpend.IsSelected, "MySpend tab is selected.");

 

app.Find.ByName<

Button>("uploadNew").User.Click();

 

upload = app.FindName<

RadUpload>("radUploadCtrl");

 

 

 

upload.UploadFile("C:\\test1",true);

 When i try to upload csv file manually, it uploads without any problem. so i am not sure where the issue is.  I have attached screen shot for your reference.

Thank you,
Maadhavi

 

0
Konstantin Petkov
Telerik team
answered on 29 Oct 2009, 05:56 PM
Hi Maadhavi,

Please specify the full file path and name as well. If your file name is test1.csv and resides in C:\, please use

upload.UploadFile("C:\\test1.csv", true);

I hope this helps.

All the best,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Maadhavi
Top achievements
Rank 1
answered on 30 Oct 2009, 07:49 PM
Hi Konstantin,

I have tried what you said but it does'nt work for me. I see the same behavior, it displays uploading and hangs. Can you upload csv files at your end?

Thank you,
Maadhavi 
0
Konstantin Petkov
Telerik team
answered on 30 Oct 2009, 09:26 PM
Hello Maadhavi,

There is no restriction specific to the file extensions being uploaded on this demo. You should be able to upload any file which is not corrupted and fall in the specified file size limit.

May I please ask some clarifying questions to confirm what's going on on your end based on your posts so far?

1. Can you upload image files (.png, .jpg) manually at your end?
2. Can you upload .csv or .xlsx manually as well?
3. Can you upload image files via a WebAii test into the same demo?
4. Can you upload .csv or .xlsx files via WebAii test?

Any additional information such as the browser and its version where you load the RadUpload live demo, along with the Silverlight version and anything else you can think of as related can help us identify the source of the problem.

Kind regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Silverlight WebAii RadControls
Asked by
Maadhavi
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Maadhavi
Top achievements
Rank 1
Share this question
or