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

Messagebox

3 Answers 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aktaar
Top achievements
Rank 1
Aktaar asked on 17 Dec 2013, 04:30 AM

This is very urgent please!!

Please find attached my coding for messagebox. The first message is displayed correctly but the second message is not is dispayed. I don't want to close myManage. myManage.Displose(); How to make the send and third message appear. Even this code doesn't work

 

NativeWindow window = new NativeWindow();

window.AssignHandle(myManager.ActiveBrowser.Window.Handle);

 

 

MessageBox.Show(window, "This is a message!");

 

 

3 Answers, 1 is accepted

Sort by
0
Velin Koychev
Telerik team
answered on 19 Dec 2013, 02:12 PM
Hello Aktaar,

Here is the code that I use on my side and it works without any issues:

Settings mySettings = new Settings();
mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;
Manager myManager = new Manager(mySettings);
myManager.Start();
myManager.LaunchNewBrowser();
myManager.ActiveBrowser.NavigateTo("http://www.google.com");
myManager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
NativeWindow window = new NativeWindow();
window.AssignHandle(myManager.ActiveBrowser.Window.Handle);
MessageBox.Show(window, "This is a message!");
MessageBox.Show(window, "Second Message");

I also recorded a short video for demonstration.

Please record a short video to show us the issue you are experiencing. Jing is great for this.

Looking forward to hearing from you.


Regards,
Velin Koychev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Aktaar
Top achievements
Rank 1
answered on 20 Dec 2013, 10:16 AM
Hi Velin,

The code is working as expected thanks a lot.
I was missing this line  "myManager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;"

Regards,
Aktaar
0
Velin Koychev
Telerik team
answered on 20 Dec 2013, 01:44 PM
Hi Aktaar,

Thank you for the reply.

It is great to hear that you've been able to resolve this problem. 

Regards,
Velin Koychev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Aktaar
Top achievements
Rank 1
Answers by
Velin Koychev
Telerik team
Aktaar
Top achievements
Rank 1
Share this question
or