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);
//Click the link that launches the security dialog
9 Answers, 1 is accepted
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.
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.
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
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.
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:
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.
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.
Could you please send me a screen shot of this security warning window so I can assist you with the code?
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.