How to handle a Prompt Dialog in Test Studio

5 posts, 0 answers
  1. Harsha
    Harsha avatar
    7 posts
    Member since:
    May 2017

    Posted 10 Aug Link to this post

    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).

    1. I need to verify whether this dialog exists
    2. 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

  2. Harsha
    Harsha avatar
    7 posts
    Member since:
    May 2017

    Posted 12 Aug Link to this post

    Hi team,

    Any update on this?

    Thanks.

  3. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    581 posts

    Posted 14 Aug Link to this post

    Hello Harsha,

    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
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  4. Harsha
    Harsha avatar
    7 posts
    Member since:
    May 2017

    Posted 14 Aug in reply to Elena Tsvetkova Link to this post

    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.

  5. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    581 posts

    Posted 17 Aug Link to this post

    Hello Harsha,

    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
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top