This is a migrated thread and some comments may be shown as answers.

How to use Alert MessageBox in Script

5 Answers 521 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Viknesvarane
Top achievements
Rank 1
Viknesvarane asked on 08 Jul 2013, 06:29 PM
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

5 Answers, 1 is accepted

Sort by
0
Samo
Top achievements
Rank 1
answered on 10 Jul 2013, 08:40 AM

 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") ;

0
Velin Koychev
Telerik team
answered on 11 Jul 2013, 11:04 AM
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!
0
Viknesvarane
Top achievements
Rank 1
answered on 11 Jul 2013, 11:43 AM
Thank you very much... your code was really helpful for me. Can you provide me the basics tutorials for this tool....
0
Viknesvarane
Top achievements
Rank 1
answered on 11 Jul 2013, 11:43 AM
Thank you very much......
0
Velin Koychev
Telerik team
answered on 16 Jul 2013, 11:25 AM
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!
Tags
General Discussions
Asked by
Viknesvarane
Top achievements
Rank 1
Answers by
Samo
Top achievements
Rank 1
Velin Koychev
Telerik team
Viknesvarane
Top achievements
Rank 1
Share this question
or