GenericDialog not handling modal

10 posts, 0 answers
  1. Lauren
    Lauren avatar
    6 posts
    Member since:
    May 2016

    Posted 19 May Link to this post

    I am trying to click "Yes" in an IE Security Warning Modal. My test passes, but it is not clicking the "Yes" button and closing the modal. I have spent far too much time on this. What am I missing?

     

    GenericDialog SecurityWarningDialog = new GenericDialog(browser, "Security Warning", "Yes", true);  // Click on the Yes button             manager.DialogMonitor.AddDialog(SecurityWarningDialog);  

    manager.DialogMonitor.Start();  

    //Click the link that launches the security dialog
    ClickLink();

    SecurityWarningDialog.WaitUntilHandled(60000);

    manager.DialogMonitor.Stop();

  2. Lauren
    Lauren avatar
    6 posts
    Member since:
    May 2016

    Posted 20 May Link to this post

    Anyone?? 

    I think the code thinks it 'handled' the modal, because it successfully moves past this action - but it didn't actually click anything during the 'handling' of it. The modal remains and it never navigates to the URL it is supposed to after a manual click.

    I have implemented this as per the documentation. Actually, I had to piece together several documents to understand the general concept of how this is supposed to be implemented. Obviously, I'm still missing something - or something's broken on Telerik's end. This is blocking my testcase and blowing up my time estimates on this task.

    There are other places in our app where we have similar modals and I would like to understand exactly how to handle them.

    Please advise...somebody!

     

  3. Lauren
    Lauren avatar
    6 posts
    Member since:
    May 2016

    Posted 20 May Link to this post

    ...or...it's not being handled and is timing out after 60 seconds? I dunno.
  4. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 24 May Link to this post

    Hi Lauren,

    Thank you for choosing Telerik Testing Framework. 

    Modal windows are supposed to be handled in a bit different manner due to their specifics. Here is an article which describes these and will be rather useful in your scenario. 

    Please let me know if that was helpful or further information will be required. 

    Regards,
    Elena Tsvetkova
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  5. Lauren
    Lauren avatar
    6 posts
    Member since:
    May 2016

    Posted 25 May in reply to Elena Tsvetkova Link to this post

    Elena,

    Thank you for your response. I’ve been reading all of Telerik’s documentation on Dialogs and Popups. They are not very clear.
    I’m still not in a working state. This seems to be an important part of the documentation and some if it seems to be missing.
    Can you fill me in on the missing parts?

    1. Is this documentation cut off? à ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions ieActions = (ArtOfTest.WebAii.Browser

    Thank you,
    Lauren
  6. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 27 May Link to this post

    Hi Lauren,

    Sorry for the caused inconvenience. The whole line is: 

    ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions ieActions = (ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions)ActiveBrowser.Actions;

    Each area which contains longer line code has a scroll bar at the bottom and you could scroll left and right. That includes the mentioned article as well. 

    Please let me know if you need further assistance. 

    Regards,
    Elena Tsvetkova
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  7. Lauren
    Lauren avatar
    6 posts
    Member since:
    May 2016

    Posted 27 May in reply to Elena Tsvetkova Link to this post

    Elena, 

    Thank you again for responding. I really appreciate you following this thread. Thank you for the tip on the scroll bar. I did miss it several times. 

    All I am wanting to do is attach to an IE modal, namely the 'Security Warning' modal and click 'Yes' to close the modal and navigate back to my app.

    The documentation that you provided above I don't think applies as it uses the "WaitForNewBrowserConnect" method which accepts a URL as one of the parameters. The IE 'Security Warning' modal does not have a URL. It looks and behaves like a windows modal.

    For this reason, I was attempting to follow the instructions on this page: 
    http://docs.telerik.com/teststudio/testing-framework/write-tests-in-code/advanced-topics-wtc/html-popups-and-dialogs-wtc/custom-handlers

    It displayed the following code as an example (which just happened to use the Security Warning as an example!): 

    GenericDialog SecurityWarningDialog = new GenericDialog(ActiveBrowser, "Security Warning", false, 1); // Click on the Yes buttonManager.DialogMonitor.AddDialog(SecurityWarningDialog);

    It wasn't clear to me if this was all that was required - so I researched more and more reading all of your pages under HTML Popups and dialogs prior to posting and hobbling together the code I initially posted above. -- which doesn't work. The code posted initially doesn't give me an error - but also doesn't actually click 'Yes' button inside of the modal. 

    So,

    1. I would like to know how to solve my problem above.

    2. Do you know what is missing 'specifically' from the code I posted initially to make it work?
    3. In addition, it seems that the documentation around popups and modals should be updated to display more code examples from the beginning to the end. Using the code as displayed in the documentation does not work. 

     

    Thanks, 

    Lauren


  8. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 01 Jun Link to this post

    Hello Lauren,

    Could you please send me a screen shot of this security warning window so I can assist you with the code?

    Thank you!

    Regards,
    Boyan Boev
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  9. Lauren
    Lauren avatar
    6 posts
    Member since:
    May 2016

    Posted 01 Jun in reply to Boyan Boev Link to this post

    Thank you for your assistance. Here is an image of the modal: 
  10. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 06 Jun Link to this post

    Hi Lauren,

    Thank you for you continuous assistance. To be able to deeply investigate the issue and whether this is a bug we would need to reproduce the same behavior on our end. This would allow my developers' team to dig into this. Do you think it would be possible to provide us a sample test and access to your application? 

    In addition I would recommend few approaches you could try to handle that scenario. First of all you could disable these warnings in general so that you don't need to handle it. Here is an article how could you do that.  If this is not applicable for some reason you could try to record key press steps - Test Studio records the keyboard keys you are pressing to handle the dialog. Please give it a try and let me know of the results. 

    Thank you once again for the cooperation and I hope to hear from you soon. 

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