Page 1 of 1

Detect a new window is opened

Posted: Tue Feb 17, 2009 8:51 pm
by atom
Hiya

I have an MDI application
I perform some menu select, that opens a new MDI child form
How can i detect and get a reference to the new MDI child form, without knowing its Title ?

Thanks

Posted: Tue Feb 24, 2009 2:22 pm
by Support Team
Hi,

First of all I need to know how do you want to search for the form.
- using a RanoreXPath expression or
- some sort of FindChild methods?

In case of RanoreXPath based search you have to consider the following:

If you have only one MDI child form within your application there is no need to specify the title with RanoreXPath.

Code: Select all

/form[@title='MDI Windows Application']/container/form
If you have two or more MDI child forms opened at the same time you should use the controlid within your RanoreXPath expression.

Code: Select all

/form[@title='MDI Windows Application']/container/form[@controlid='65282']
When using the FindChild or FindChildren method you'll have to distinguish between different MDI children manually in code.

RanoreXPath would be the more comfortable way to identify a MDI child form without knowing its title.

best regards,

Christoph
Ranorex Support Team