How to verify Javascript alert box

2 posts, 0 answers
  1. Vishal
    Vishal avatar
    18 posts
    Member since:
    Jan 2014

    Posted 04 Mar 2014 Link to this post


    I have a scenario where I have to verify whether javascript  alert has appeared or not. Based on the alert appearance I have to perform few more checks.
    Please let me know how should I verify whether javascript alert has appeared or not?

    It would be really helpful if you could provide me a sample code..
  2. Velin Koychev
    Velin Koychev avatar
    88 posts

    Posted 07 Mar 2014 Link to this post

    Hello Vishal,

    You can write your own Custom Dialog Handler for that purpose.  Inside MyCustomAlertHandler you can write the code that will be executed only if the alert dialog is triggered. 

    Let me know if you need any additional assistance. 

    Velin Koychev
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top