Page 1 of 1

Text.TextValue

Posted: Sat Oct 03, 2009 11:58 am
by atom
Hiya

I have an MFC Text box
If i use method Text.TextValue="Hello"
The MFC control fails to see that ive modified the text, and will use its original value

Is this a known problem?

thanks

Re: Text.TextValue

Posted: Mon Oct 05, 2009 9:58 am
by Support Team
Setting the Text.TextValue property works for standard MFC edit controls. There could be a problem though if it is a custom MFC control which overrides the handling of the WM_SETTEXT message and does not correctly react to that message. E.g. if the control holds an internal variable for its text and does not update that variable when the WM_SETTEXT message is sent.

In general, for testing purposes its better to use the Ranorex.Keyboard class to enter text, since this is the actual way a user would put in text into controls. Setting a Ranorex.Adapter property always uses some technology dependent technique to communicate with the actual UI element, i.e. a technique different from how a human user would do it - you could even do things a human user can't do.

Regards,
Alex
Ranorex Support Team

Re: Text.TextValue

Posted: Mon Oct 05, 2009 7:01 pm
by atom
Ok thank, I wrapped the TextValue method into one using Keyboard and its Ok now