Ranorex

form.findChildText return null

 
Post new topic   Reply to topic    Ranorex Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
cherry



Joined: 06 Jun 2007
Posts: 5

PostPosted: 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
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: 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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> Bug Reports All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum