Messagebox

4 posts, 0 answers
  1. Aktaar
    Aktaar avatar
    1 posts
    Member since:
    Jan 2012

    Posted 16 Dec 2013 Link to this post


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

     

     

  2. Velin Koychev
    Admin
    Velin Koychev avatar
    88 posts

    Posted 19 Dec 2013 Link to this post

    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
  3. Aktaar
    Aktaar avatar
    1 posts
    Member since:
    Jan 2012

    Posted 20 Dec 2013 Link to this post

    Hi Velin,

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

    Regards,
    Aktaar
  4. Velin Koychev
    Admin
    Velin Koychev avatar
    88 posts

    Posted 20 Dec 2013 Link to this post

    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
Back to Top