How to use Alert MessageBox in Script

6 posts, 0 answers
  1. Viknesvarane
    Viknesvarane avatar
    3 posts
    Member since:
    Jul 2013

    Posted 08 Jul 2013 Link to this post

    Hi All,

    I m fresher for Telerik Test Studio, can anyone tell me the procedure to write code for display a Alert MessageBox in Script.

    Regards,

    Viknesvarane
  2. Samo
    Samo avatar
    2 posts
    Member since:
    Jul 2013

    Posted 10 Jul 2013 Link to this post

     Hope this on will help u..

    Steps:

    1- Add.
    using System.Windows.Forms;

     

     2- This code is for showing the Alert message.

    NativeWindow a = new NativeWindow();
    a.AssignHandle(ActiveBrowser.Window.Handle);
    MessageBox.Show(a, "Your Message") ;

  3. Velin Koychev
    Admin
    Velin Koychev avatar
    88 posts

    Posted 11 Jul 2013 Link to this post

    Hi,

    @Samo - Thank you for sharing this sample code. We appreciate your help.

    @Viknesvarane - Does this code cover your requirements? Keep in mind that you will also need  to add reference to System.Windows.Forms namespace. You can watch this short video as a demonstration.

    Regards,
    Velin Koychev
    Telerik
    Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
    Reserve your seat today!
  4. Viknesvarane
    Viknesvarane avatar
    3 posts
    Member since:
    Jul 2013

    Posted 11 Jul 2013 Link to this post

    Thank you very much... your code was really helpful for me. Can you provide me the basics tutorials for this tool....
  5. Viknesvarane
    Viknesvarane avatar
    3 posts
    Member since:
    Jul 2013

    Posted 11 Jul 2013 Link to this post

    Thank you very much......
  6. Velin Koychev
    Admin
    Velin Koychev avatar
    88 posts

    Posted 16 Jul 2013 Link to this post

    Hello Viknesvarane,

    You might find articles from our documentation like Create a Custom Coded Step, Testing FrameworkCode SamplesWrite tests in code  and our API reference very useful.


    You can also follow our blog and check our videos, where you can find very useful tips and tricks.

    I hope this helps. 

    Regards,

    Velin Koychev
    Telerik
    We've released our first-ever public Test Studio BETA! Download the BETA, install it,
    and send us your feedback! Expires mid-August!
Back to Top