Download Dialog will not clear (receiving confirm dialog)

11 posts, 0 answers
  1. Al
    Al avatar
    14 posts
    Member since:
    Mar 2017

    Posted 10 Mar 2017 Link to this post

    I have a simple test that attempts to download a PDF and when the download dialog appears it will not work properly. First attempt it clicks save but will not move to the next step in the test (I have seen postings about the notice about download complete, but this has not helped). On second attempts, the dialog opens and a confirmation dialog appears which cannot be cleared with the download dialog. Not sure if that make total sense, but I find that this option is rarely used.

    Also, It appears that the step cannot be converted to a code step (option is greyed out).

    I prefer to record some basic steps in the UI and then reuse them to build other tests quickly. Thanks for any help provided.

  2. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    942 posts

    Posted 14 Mar 2017 Link to this post

    Hi Al,

    Could you please provide the execution log of the failing test that includes the dialog step (zipped and attached to this forum thread)? Additionally it would be useful to know what happens while execution - is the file actually downloaded? 

    Are you able to successfully record a download dialog step while recording the test? Please double check if the path to save the file in the step is the correct one? You could record a short video demonstrating the execution for further convenience. We recommend using Jing as a free to use and share videos online tool. 

    Which is the version of Test Studio currently in use? 

    Thank you for the cooperation! 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  3. Al
    Al avatar
    14 posts
    Member since:
    Mar 2017

    Posted 14 Mar 2017 Link to this post

    Thanks for the reply.

    First I am using Test Studio v2017.1.207.0 and recorded the script using FF v51.0..1 (32-bit) and have tried playing it back on both FF and Chrome v56.0.2924.87 (64-bit).

    The test is fairly simple; login, click a link, then click a button to download a PDF, logoff. I can record the script without any issue. I do have to modify the DownloadPath for the step because it records both the folder and the file name (Downloads\Report.pdf) when all that is needed is the file name.

    The dialog does appear when playing back and will actually save the file properly. The problem is that the step then just appears to be listening for an event to be raised to let it know that the dialog has been cleared. Thus the timeout.

    I have attached the log you requested, but there is nothing really to discern from it (then again I may just be blind too). I have also attached a screen shot from within Test Studio. It appears that I cannot convert the step into code directly. I wanted to see how the step would translate and then change it to use a data driven approach.

  4. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    942 posts

    Posted 17 Mar 2017 Link to this post

    Hello Al,

    Thanks for the additional details and resources shared. 

    I tried to reproduce the same behavior but it was unsuccessful - handling download dialog is working properly. However I would like to clarify that the download path in a download dialog step requires full path to the download location along with the file name. This is automatically included in the step while recording although handling the dialog in record mode shows the file name only. Please find some further details about dialogs here

    What I found while investigating is that choosing the Desktop as download location might not work as expected. Could you please try recording a new dialog and choose another location - C:\ drive for example. What the result would be? 

    The dialog steps could not be converted directly to code although they could be handled in a coded step - here you could find an example how to do that for download dialog. 

    Please keep me posted about the findings on your end. Thanks! 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  5. Al
    Al avatar
    14 posts
    Member since:
    Mar 2017

    Posted 17 Mar 2017 in reply to Elena Tsvetkova Link to this post

    So, I recorded another simple script but only difference was using "c:\report.pdf" for the filename.

    Here are some interesting notes:

    1. First time playback it ran fine
    2. I was able to select the option to Edit in Code
    3. I removed the "c:\" portion of the file name ran the script again and it failed
    4. Once the script failed, I could no longer convert the step to code

    Thoughts?

  6. Al
    Al avatar
    14 posts
    Member since:
    Mar 2017

    Posted 17 Mar 2017 in reply to Al Link to this post

    More bad news. After finding that I was able to convert the step to code, I am again no longer able to do that.

    I have tried:

    1. Adding a new test to an existing project

    2. Tried starting with a new project and new web test

    3. Tried restarting machine and new project/new test

    4. Tried new project/new test manually adding download dialog action (only thing in the web test)

    At this point it appears that it just won't work again at all. I thought it might be a test issue or even a project issue. But that may not be the case. Thoughts?

    NOTE: I do have VS2015 and VS 2017 installed, could the issue be with VS2017 being on the system?

  7. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    942 posts

    Posted 22 Mar 2017 Link to this post

    Hello Al,

    Thank you for sharing further details. 

    As I mentioned in my previous reply handle dialog steps could not be converted in code because of the way they should be handled. Also once a step is converted to code it could not be reverted back. Therefore I would like to know what do you mean when you say that after the test fail you could not convert the step anymore? Do you mean you have recorded it again? Please find here all available features in the step context menu

    I would like to kindly ask you to try to recall how you managed to convert such a step to code since this could be an error on our side. If you could provide us details and exact steps how you managed to do that it will be quite useful. 

    Additionally I would like to note that the full path is required for a Download dialog step and you should leave it the way it is recorded - C:\report.pdf. What is the reason you want to change it? 

    Thanks for your cooperation! 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  8. Al
    Al avatar
    14 posts
    Member since:
    Mar 2017

    Posted 22 Mar 2017 in reply to Elena Tsvetkova Link to this post

    Thanks again for the response.

    When you asked me to record a new script, I did so and I was able to run the script fine. I was also able to right click on the step for the Download Dialog and in the context the Edit in Code was an option. After changing the path in the step and causing the test to fail, this option was no longer available (grayed out). So I tried recording a new test in the same project following what I did earlier and when right clicking on the step the Edit in Code option was not available; but the test ran fine. Then I decided to start a new test project (thinking that maybe the other test had somehow affected the new one in the same project) and record the same script again. The test worked fine but when I right clicked on the step the option was grayed out; I could not convert the step to code. I restarted my machine at that point and tried a new test project with a new test. Same results.

    As for why I would like to convert the step to code is to allow the test to be data driven based on a call to a database to fetch specific information. The file being downloaded it a financial report which for each company in the system is named the same but has different request data. I would like to be able to save that report and then have the script create a new report based on the same data in the requested report so the two can be compared (allowing for a review of shifting data which feeds the report; I should see changes which were made upstream). Handling this step I would need to name the reports respectively as well as download them to a specific location (the full path would always be used, but I think it odd that the program would not allow for a download to take place to a partial path like "report.pdf" as not all people have the ability to save/download files to their own computers and instead are sent to a network location which is a mapped network drive for them or maybe even a UNC path).

    I hope that makes sense; if not please let me know.

    Thanks again.

  9. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    942 posts

    Posted 27 Mar 2017 Link to this post

    Hello Al,

    Thanks for getting back to me and sharing details about your requirements. 

    As I mentioned previously converting a dialog step into code is always disabled. I am not able to reproduce what you described as you could not any more as well. I guess that was some kind of misapprehension. 

    Though I would like to note that dialogs could be handled in code although such a step could not be converted. The process is not straight forward because there are built-in listeners and handlers in Test Studio. In case the dialog will be handled in code these actions should also be considered and handled. I previously shared this article with you which describes how a download dialog could be handled within code. 

    To get back to the initial issue you reported that the download dialog could not be handled - I hope after different attempts you are now convinced it works fine. Test Studio does not have a working directory or something similar and therefore requires full paths to handle download or upload dialogs. Shared network locations are also not an issue as long as they could be accessed by the user who runs Test Studio currently. 

    While I was trying on my end if there are any troubles with shared network locations I only found that the recorder does not fetch the correct path. Though if it is manually entered in the step itself the script successfully downloads the file to the shared location. Since this could be a workaround only I submitted a bug report to our public feedback portal. Please find it here where to follow its progress, you could also vote, comment, etc. 

    Following the description of your requirements I would like to note that you could data drive the tests to generate and download the different reports. Data source could be added to input or verification values and with a single data source you could handle the described scenario. 

    I hope all of the above information will be helpful to you. Please do not hesitate to contact me in case of further questions. Thank you in advance. 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  10. Al
    Al avatar
    14 posts
    Member since:
    Mar 2017

    Posted 27 Mar 2017 in reply to Elena Tsvetkova Link to this post

    Thanks again for the information. Since the recorded step for a Download Dialog should NOT be able to be converted from a test step to one in code, I can now stop trying to do that. I thought any test step should convert to an equivalent code step. This would allow the basic functionality to be placed into the code and make it easier for editing. But I don't have a problem just creating the code from scratch and then getting it to work with data.

    As for the sample testing I have been able to do, I have bee able to break apart much of the tests created into code and extend them using VS2017.

    Cheers.

  11. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    942 posts

    Posted 29 Mar 2017 Link to this post

    Hi Al,

    I am glad we managed to figure out the encountered confusion. It is also great to hear that you successfully extend the scripts in Visual Studio. 

    In case of any further queries please do not hesitate to contact us again! 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top