This is a migrated thread and some comments may be shown as answers.

GenericDialog not handling modal

9 Answers 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lauren
Top achievements
Rank 1
Lauren asked on 19 May 2016, 11:24 PM

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();

9 Answers, 1 is accepted

Sort by
0
Lauren
Top achievements
Rank 1
answered on 20 May 2016, 04:27 PM

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!

 

0
Lauren
Top achievements
Rank 1
answered on 20 May 2016, 05:21 PM
...or...it's not being handled and is timing out after 60 seconds? I dunno.
0
Elena
Telerik team
answered on 24 May 2016, 12:04 PM
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
 
0
Lauren
Top achievements
Rank 1
answered on 25 May 2016, 03:25 PM
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
0
Elena
Telerik team
answered on 27 May 2016, 08:11 AM
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
 
0
Lauren
Top achievements
Rank 1
answered on 27 May 2016, 06:09 PM

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


0
Boyan Boev
Telerik team
answered on 01 Jun 2016, 02:48 PM
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
 
0
Lauren
Top achievements
Rank 1
answered on 01 Jun 2016, 08:06 PM
Thank you for your assistance. Here is an image of the modal: 
0
Elena
Telerik team
answered on 06 Jun 2016, 12:42 PM
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
 
Tags
General Discussions
Asked by
Lauren
Top achievements
Rank 1
Answers by
Lauren
Top achievements
Rank 1
Elena
Telerik team
Boyan Boev
Telerik team
Share this question
or