Ranorex

Null Pointer Exception

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet
View previous topic :: View next topic  
Author Message
dave0989



Joined: 12 Jul 2007
Posts: 3

PostPosted: Mon Jul 16, 2007 5:29 pm    Post subject: Null Pointer Exception
I have been working through the examples you have listed for .net testing. The real only change I have made is the name of the control and the caption text.


Control seekButton = form.FindChildText("Seek Device");
Mouse.ClickControl(seekButton);

I get a Null Pointer Exception when I run the application. and it points to the first line in the code above. I ran the example almost the same way with the exception of a few name changes. What object am I supposed to instantiate in this example?
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Mon Jul 16, 2007 8:05 pm    Post subject:
Code: click into code to enlarge
I get a Null Pointer Exception when I run the application. and it points to the first line in the code above.


This can happen if the form object reference is null (e.g. Application.FormFindTitle cannot find a form with the specified title and returns null):

Form form = Application.FindFormTitle("RanorexTestedApp");

Please check your form object, which sample do you mean?

Jenö
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 -> RanorexNet 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