Text.TextValue

Bug reports.
atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Text.TextValue

Post by atom » Sat Oct 03, 2009 11:58 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Text.TextValue

Post by Support Team » Mon Oct 05, 2009 9:58 am

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
.
Image

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Re: Text.TextValue

Post by atom » Mon Oct 05, 2009 7:01 pm

Ok thank, I wrapped the TextValue method into one using Keyboard and its Ok now