Dialog Elements do not show up.

1 Answer 125 Views
Dialog
Esad
Top achievements
Rank 1
Esad asked on 09 Jun 2021, 04:16 PM

Good morning,

I am trying to add dialog elements to my tests but none of them shows up. I even tried testing as a step but no luck. I see that the browser handlers are up to date. Any help would be appreciated.

Elena
Telerik team
commented on 10 Jun 2021, 01:02 PM

Hello Esad, 

I am sorry to know your are having difficulties with dialog handling and will assist you about this.

Can you, please, elaborate further details on what you try to accomplish? Do you try to fire a dialog in the tested page while recording? If you handle the dialog as usually, do you see a 'Handle dialog' step added in Test Studio test or no step is added in regards the dialog action? 

If this is not the scenario you have troubles with, please, describe what elements you are trying to add and where do you expect these to be shown. 

I am looking forward to hearing back from you.

Regards,
Elena

Esad
Top achievements
Rank 1
commented on 10 Jun 2021, 02:19 PM

Good morning Elena,

I added alert, confirm and prompt dialogs to the current workflow I work with. The tests I am doing is basically opening a .PDF file from path and I like to prompt a message that says It was successful. The PDF file opens but the dialog does not show up. Gives the following error:

Timed out waiting '20000' msec. for any dialog to be handled '1'

I have a couple of IF-ELSE statements, where eventually, I like to add these dialogs if the particular IF statement is true then prompt a message.

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 10 Jun 2021, 03:40 PM

Hello Esad,

Thank you for elaborating on the specific scenario. 

As far as I understand you have recorded the action to download a PDF file. When you try to execute this, the file gets downloaded and opened in the browser, but the recorded step fails. 

If this is so, I suspect that the browser in use is not calibrated - all browsers need certain settings to be completely compatible with Test Studio and this is what we call calibration. Some of these settings are related to the browser actions when a file will be downloaded - we need to always specify the location where this will be downloaded. As to the PDF files specifically, we also need to restrict the browser to automatically open this type of file - that way we can ensure this will be opened with the Test Studio mechanism behind the scenes. You can check the specific settings for each browser if you expand the Manual Configuration section at the bottom of the respective article (here is the Chrome one for example).

So, once the browser settings are correct, you should see the set of steps in the test when downloading a PDF file as described in this article. Then, the test run should also be successful. 

And as far as I understand, until trying to sort out the issue,  you expected to have the option to trigger a dialog message from Test Studio test. I have to admit that this is not a built-in option - the test automation run is not supposed to trigger prompt messages, but handle such if the application under test pops up any. 

Still, if this is the scenario you need to cover, you can implement any custom code solution in a Test Studio project - either using a coded step in a test, or a standalone code file accessible for all tests in a project.  

Please, let me know if this information addresses all your doubts, or if you need any further assistance. Thank you for your cooperation once again. 

Regards,
Elena
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
Esad
Top achievements
Rank 1
commented on 10 Jun 2021, 05:03 PM

Hello Elena,

I thought the dialog elements could be used in any fashion. I checked everything else looks fine with the browser, so can you refer to any source (a video or documentation) that I may refer how to use it.

Esad
Elena
Telerik team
commented on 11 Jun 2021, 02:13 PM

Hi Esad, 

The 'Handle dialog' steps in the Test Studio tests are used to handle the dialogs, which pop up from the tested application. These are automatically recognized and recorded from the Test Studio recorder.  Alternatively, you can add such step manually to the test from the Step Builder

If it comes to the PDF file download, you can take a look at the article I referred in my previous post. This describes the expected behavior when generating a PDF from a page. In case you have any troubles with such scenario, please, elaborate on the details. You can prepare some screenshots of the steps you have recorded in the test, and what happens in test runtime - this will help me understand what might be going wrong. 

Let me know if I have misread your message and there is anything else you need assistance for.

Thank you for your understanding in advance. 

Regards,
Elena

Tags
Dialog
Asked by
Esad
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or