WPF App Message Box Causes SPY to Crash

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 47
Joined: Thu Nov 03, 2016 12:03 am

WPF App Message Box Causes SPY to Crash

Post by Hondo » Fri Sep 29, 2017 7:01 pm

Ranorex v7.2

Application pops a Message Box in different places in the UI. All from the same call "MessageBox.Show(stuffings)".
I've mapped the MessageBox completely and can address/id the xpaths most of the time.

In certain places of the UI, Ranorex gets blocked/locked out and can't id the MessageBox at all.
The only way Ranorex can negotiate the MessageBox is to send a Key Sequence e.g. {Return} But timing is everything.
Attempts to id these instances of the MessageBox with the SPY cause it (the SPY) to crash.

Any help would be appreciated.

User avatar
Posts: 324
Joined: Fri Jan 09, 2015 3:24 pm

Re: WPF App Message Box Causes SPY to Crash

Post by RobinHood42 » Mon Oct 02, 2017 10:10 am

Hi Hondo,

Do you know when the MessageBox will pop-up during your test run?

If yes, isn't the key sequence action a viable solution?
If no, how to you handle the Message Box? Are you using a pop up watcher? Which rx path to you use to recognize the window?

A Ranorex snapshot of the MessageBox would also be helpful: snaphot file