| View previous topic :: View next topic |
| Author |
Message |
cherry
Joined: 06 Jun 2007 Posts: 5
|
Posted: Wed Jun 06, 2007 4:13 pm Post subject: form.findChildText return null |
|
| I run the program many times. sometime it can return the control, but sometime it just returns null. And at every first time when I open the VS2005 I run the program, it returns null. |
|
| Back to top |
|
 |
admin Site Admin
Joined: 05 Jul 2006 Posts: 351
|
Posted: Thu Jun 07, 2007 4:35 pm Post subject: |
|
You should consider that the tested app runs in an other process space. In some cases you should wait a little bit after finding the form. This is required if the controls in the tested app needs some time to be generated.
Please try following:
Code: click into code to enlarge
Form form = Application.FindFormTitle("MiniView");
Application.Sleep(200);
Control menuStrip = form.FindChildText("MenuStrip");
Best Regards
Gabor
Ranorex Team |
|
| Back to top |
|
 |
|