Handle Download dialog

12 posts, 0 answers
  1. CVue
    CVue avatar
    36 posts
    Member since:
    Mar 2015

    Posted 13 Jul 2015 Link to this post

    Not able to save to specify path after inserting a handle download dialog step after clicking on saving a file. What happen to "Save As" option?
  2. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 16 Jul 2015 Link to this post

    Hello,

    Make sure you browsers are properly calibrated.

    Regards,
    Ivaylo
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  3. CVue
    CVue avatar
    36 posts
    Member since:
    Mar 2015

    Posted 16 Jul 2015 in reply to Ivaylo Link to this post

    Before, it was working fine to where once you click a download link, the dialog open, but it will not go to save as (path) part. even if you set the dialog to "Save", it is not saving it to the path given. Stuck!
  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1040 posts

    Posted 21 Jul 2015 Link to this post

    Hello Cher,

    Have you calibrated the browsers? You can also configure them manually as it is described here.

    If the issue persists please send us the code you are using as well as the project so we can review it and give you a solution.

    Thank you.

    Regards,
    Boyan Boev
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  5. CVue
    CVue avatar
    36 posts
    Member since:
    Mar 2015

    Posted 24 Jul 2015 in reply to Boyan Boev Link to this post

    It's not working for IE11, because the download dialog doesn't pop up to the screen therefore the handle download dialog for test studio will not pick it up and do the save as. Must be because of my click link method, I'm finding it by tag name 'a', my link will never have an ID so don't ask for it either. If i manually click the link the dialog will appear and the save handler will work, but if i use my click method, it will appear the dialog at the bottom of the page but the dialog handler will not work and save the file.

     

    var els = document.getElementsByTagName('a');
                                                for (var i = 0, l = els.length; i < l; i++) {
                                                var el = els[i];
                                                if (el.text === 'Complete') {
                                                    el.click()
                                                }}​

  6. Boyan Boev
    Admin
    Boyan Boev avatar
    1040 posts

    Posted 29 Jul 2015 Link to this post

     Hi Cher,

    Could you please try replacing Click with MouseClick:

     el.MouseClick()

    This will simulate a real user clicking.

    Hope to hear from you soon.

    Regards,
    Boyan Boev
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  7. CVue
    CVue avatar
    36 posts
    Member since:
    Mar 2015

    Posted 29 Jul 2015 in reply to Boyan Boev Link to this post

    TypeError: el.MouseClick is not a function that won't work.
  8. Boyan Boev
    Admin
    Boyan Boev avatar
    1040 posts

    Posted 03 Aug 2015 Link to this post

    Hi Cher,

    We have our method MouseClick which simulate a real user. You can use this one.

    If the issue persists could you please send the project so I can review it and give you a solution.

    Thank you.

    Regards,
    Boyan Boev
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  9. CVue
    CVue avatar
    36 posts
    Member since:
    Mar 2015

    Posted 12 Aug 2015 in reply to Boyan Boev Link to this post

    yes, how would I find my link to click when the link does not have a id or name associated with it? it's is in a div container: <a href = file.com>click</a>
  10. Boyan Boev
    Admin
    Boyan Boev avatar
    1040 posts

    Posted 17 Aug 2015 Link to this post

    Hi Cher,

    If the href has unique value (i.e. file.com is unique) you can find it with that coded step:

    HtmlAnchor link = ActiveBrowser.Find.ByAttributes<HtmlAnchor>("href=file.com");

    Let me know if that helps.

    Regards,
    Boyan Boev
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  11. CVue
    CVue avatar
    36 posts
    Member since:
    Mar 2015

    Posted 17 Aug 2015 in reply to Boyan Boev Link to this post

    the file is not unique, always changing file name.
  12. Boyan Boev
    Admin
    Boyan Boev avatar
    1040 posts

    Posted 20 Aug 2015 Link to this post

    Hello Cher,

    If the anchor has not an unique attribute which can be used for locating it you should create a chained find expression.

    Please see this article how to proceed.

    Let me know if that helps.

    Regards,
    Boyan Boev
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!