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

6 posts, 1 answers
  1. Karla
    Karla avatar
    24 posts
    Member since:
    Jun 2011

    Posted 20 Dec 2011 Link to this post


    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,
  2. Answer
    Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 21 Dec 2011 Link to this post

    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
  3. Karla
    Karla avatar
    24 posts
    Member since:
    Jun 2011

    Posted 23 Dec 2011 Link to this post


    Hi Thanks for the answer,

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


  4. Habiba
    Habiba avatar
    9 posts
    Member since:
    Oct 2018

    Posted 13 Nov 2018 Link to this post

    if i 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?

  5. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    1051 posts

    Posted 14 Nov 2018 Link to this post

    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!
  6. Habiba
    Habiba avatar
    9 posts
    Member since:
    Oct 2018

    Posted 14 Nov 2018 in reply to Elena Tsvetkova Link to this post

    thank you, Miss, Elena
Back to Top