Hi team,
The application under test is asking to enter some values in a dialog (Capture 1) and when I recorded, it shows as a Prompt Dialog (Capture 2).
- I need to verify whether this dialog exists
- Then, I need to enter some value and click on either Ok or Cancel button
I added a step to handle this dialog but when the script is running Test Studio is unable to enter provided value and click on the button.
This dialog can be dragged over the page.
I've gone through your threads but couldn't find any for handling Prompt dialog.
Could you please provide a sample coded step to handle above two instances for Prompt dialog?
Regards,
Harsha
6 Answers, 1 is accepted
Hi team,
Any update on this?
Thanks.
Thank you for sharing details about the faced difficulty.
Please let me know what is the recorded step when you try to handle that dialog during recording? What is the behavior when executing that recorded step?
Could you please provide the step failure details for the failing step?
To address your query for a coded solution how to handle a dialog I would recommend you double check the custom dialog handler described here.
Thanks in advance for your time and cooperation.
Regards,
Elena Tsvetkova
Progress Telerik
Test Studio Trainings
Hi Elena,
Thank you so much for the reply. I managed to write a coded step to verify the existence of Prompt dialog.
But I'm still facing an issue when running the step for handling the dialog as it shows up the dialog two times when running my script. Initially it enters the value I'm asking and when clicking on the button the dialog shows up again. This does not happen when I do it manually in the application.
Thanks.
Thank you for your cooperation.
The described behavior does not seem to be caused by Test Studio. Though I would like to place few more questions about that dialog. Please let me know your input on the below queries:
- is the execution behavior the same against the different browsers?
- if you do not enter value but cancel the prompt dialog will the behavior change?
- could you double check if entering the same value in the dialog manually in the application would not trigger the dialog once again?
- would it be possible to provide a sample test containing the handle dialog step for further investigation? if the application under test is public accessible I would be glad to know if I could execute the test on my end.
I will be I will be looking forward to hearing from you! Thanks in advance!
Regards,
Elena Tsvetkova
Progress Telerik
Test Studio Trainings
Hi Elena,
I'm sorry for not getting back to you.
I managed to handle the Prompt dialog and verify the Caption on it.
But now I need to verify that OK and Cancel buttons (as shown in Capture 1) are also displayed in the dialog.
Could you please guide me on this?
Regards,
Harsha
Thank you for getting back. I am glad to know you managed to handle the dialog successfully.
The text in a dialog box could be verified in a coded solution described here for IE and here for Chrome. Though this approach would not provide verification of the buttons.
To verify these you would need to get the Handle of the browser when the dialog appears and then implement custom code using the Microsoft UI Automation framework to identify the dialog and verify its buttons. Though you should be informed this is a custom implementation which is out of the Test Studio support team authority.
I hope the above information will be helpful to you to find the best solution to accomplish your scenario. Thank you for your understanding in advance and do not hesitate to contact me again in case of further queries.
Regards,
Elena Tsvetkova
Progress Telerik
Test Studio Trainings