Forum Discussion

apurvak's avatar
Occasional Contributor
5 years ago

Unable to idetify message box using object spy

Hi, I am trying to identify a message box using object spy; but it is unable to identify the message box. Below mentioned are the methods which are not present due to which it is unable to identify t...
  • AlexKaras's avatar
    5 years ago



    I think that you need to talk to developers and ask them how they open descendant window for the second application.

    On my machine, main application window becomes not responsive after the OK button is clicked and remains unresponsive until this spawned window is closed.
    (My guess, is that the window is opened within the .Click() button handler and thus the whole UI of the application is blocked until the child window is closed. If this is the case, consider the Runner.CallObjectMethodAsync() method described here:



    I decompiled both your applications using Telerik's Just Decompile and noted that:

    a) Message box is opened indeed from the button's click() event handler. So you definitely will need to click this button asynchronously as it was suggested above;

            private void Button_Click(object sender, RoutedEventArgs e)
                MessageBox.Show("Hi TestComplete...", "Test Complete", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification | MessageBoxOptions.DefaultDesktopOnly);


    b) Message box in the WpfApplication_NotAbleToIdentify.exe is opened using additional MessageBoxOptions.ServiceNotification | MessageBoxOptions.DefaultDesktopOnly flags (see code above) introduced for later versions of Windows. You may read more about them for example here:, and

    Considering the above articles, I think that you need to talk with your developers and ask if these flags are really required? What will happen if no user is logged-in while the message is displayed? Won't this deadlock the application?


    In case these flags are required indeed, I think that you need to contact Support directly via this form ( and ask for their recommendations. The case is that according to what I read in the above articles and saw in TestComplete's Object Browser, the whole UI of your application is locked and invalidated while the message box window is present on the screen. (TestComplete's UI is also frosen if the Object Browser is opened.)