Window is invisible and thus cannot be activated
- 6 years ago
Bah ! I think I know what it is !
There's this post, written by me, not to long ago on a Smartbear Functional Web Testing board near you ! It explains that DevX has a quirk with setting text. SetText() is unreliable - TestComplete can't alway find it and DevX doesn't register changes. .Keys() however works fine...
There's no facepalm emoticon..
Quick, someone repost my post so I can mark it as the accepted solution. I can't mark my own answer as a solution if I was just being a bit slow :smileytongue:
- 6 years ago
Hi,
> SetText() is unreliable [...]
Not that it is unreliable... It just works differently when compared to .Keys().
.SetText() tries direct assignment to the property that keeps the value of the given object. This should work much faster than .Keys(), but the problem is that a lot of controls do not process direct property assignment but expect the value to be modified via either keypresses or be pasted from the clipboard.
On the contrary, .Keys() method puts key press messages into the control's message queue. Exactly like the OS does when end-user types on the keyboard. Then control's message routine extracts and processes keycodes (and all other codes like mouse events etc.) from the queue and either processes them or relays to the parent message queue. This process is obviously slower but corresponds to the regular developers' expectations.