Javascript Alert Dialog

1 Answer 15 Views
Dialog Test Recording
Maria
Top achievements
Rank 1
Iron
Maria asked on 01 Apr 2024, 04:49 PM

Hello Telerik Team,

 

I'm currently automating a script for a web based application that shows a Javascript alert as soon as Save is clicked in the application.  However, the Telerik recorder is not able to capture it but I need to be able to accept the alert (click OK) in order to continue to the next step.  Does Telerik support this type of scenario?

Thank you and look forward to your response.

Maria

1 Answer, 1 is accepted

Sort by
0
Shtilianov
Telerik team
answered on 02 Apr 2024, 11:05 AM

Hi,

If the handle alert dialog step is not recorded, you can add it manually from the step builder directly in the test and put it immediately after the click and before the download handle step. I am assuming that the event sequence is click on button -> alert -> dismiss alert -> download dialog show. If that's the case, adding the handle alert dialog step should work. How to add a dialog handle step from the step builder.

If the whole scenario turns out more complicated, you may need to handle the dialogs in a coded step where you should put the click step and then listen for new dialogs and handle them one by one. 

How to access the dialogs collection in code.

Regards, Miroslav Shtilianov Progress Telerik

Virtual Classroom is the free self-paced technical training portal that gets you up to speed with Telerik and Kendo UI products including Telerik Test Studio! Check it out at https://learn.telerik.com/.
Tags
Dialog Test Recording
Asked by
Maria
Top achievements
Rank 1
Iron
Answers by
Shtilianov
Telerik team
Share this question
or