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

How can I record a step when I upload a document?

5 Answers 210 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Karla
Top achievements
Rank 1
Karla asked on 20 Dec 2011, 11:59 PM

Hi,

I was recording some steps that include upload a document from my computer.

There is a way to record when I select the document from my computer?  (See the attachment)

thanks,

5 Answers, 1 is accepted

Sort by
0
Accepted
Anthony
Telerik team
answered on 21 Dec 2011, 10:50 PM
Hi Karla,

An Upload Dialog handler step should have automatically been added to the test when you recorded interacting with that dialog. If not, you can manually add one from the Dialogs button in the toolbar.

If that still doesn't work, it may be an issue with the title of the dialog. Notice it says "Open" and not "Choose File to Upload" as seen in a screen shot in the above link. In that case, you'll have to resort to handling the dialog in code. You will need to delete the Handle File Upload test step because implementing it in code will actually conflict with a non-coded dialog handler of the same type.

See the code sample below. Please note you will need to put in code the action that clicks the "Browse" button (or whatever the button is labeled that launches the Open File dialog).

// Initialize and activate a Handle FileUpload dialog handler
FileUploadDialog dlg = new FileUploadDialog(ActiveBrowser, @"C:\test.txt", DialogButton.OPEN, "Open");
Manager.DialogMonitor.AddDialog(dlg);
  
// Click the button that causes the Open File dialog to launch
//(insert code here)
  
// Wait up to 10 seconds for the dialog to be handled, then deactivate the dialog handler
// to create and use a new one later in the test if needed.
dlg.WaitUntilHandled(10000);
Manager.DialogMonitor.RemoveDialog(dlg);
The highlighted portion is where you indicate the custom title of the Upload dialog.
 
Regards,
Anthony
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Karla
Top achievements
Rank 1
answered on 24 Dec 2011, 12:07 AM

Hi Thanks for the answer,

I used the new features for download and upload, with the dialogs, and works very nice!


0
Habiba
Top achievements
Rank 1
answered on 13 Nov 2018, 08:42 AM

if play the record the file attachment is not automatically, I have to add manually.

how can add automatically file in a test with test studio?

0
Elena
Telerik team
answered on 14 Nov 2018, 03:22 PM
Hi Habiba,

You are referring to a thread which dates back almost 7 years ago. Nowadays Test Studio detects and handles dialogs automatically. 

Therefore I would recommend you start a new conversation sharing further information for the issue you are facing. You can consider sharing the following details: 
- which is the version of Test Studio you are using 
- what type of application you are testing - web or WPF (if web, which browser, along with its version, do you use)
- what is the scenario to cover
- what is not working as you expect it to
- what you have tried so far to fix this

Your comments on all of these topics will be helpful for me to understand what you struggle with and provide you the most proper advice. Thanks for your cooperation in advance. 

Regards,
Elena Tsvetkova
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Habiba
Top achievements
Rank 1
answered on 15 Nov 2018, 04:38 AM
thank you, , Elena
Tags
General Discussions
Asked by
Karla
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Karla
Top achievements
Rank 1
Habiba
Top achievements
Rank 1
Elena
Telerik team
Share this question
or