Forum Discussion
Hi,
I expect that keyword test enters employer's name using the .SetText() method. If this is the case, replace .SetText() with .Keys() method call and check if this helps.
Thank You... this simple modification worked.
- AlexKaras8 years agoChampion Level 3
Great, thank you for the update.
P.S. Change Tools | Options | Engines | Recording | Record text input into simple editors as option to 'Keys' to prevent this problem with future recordings.
- Colin_McCrae8 years agoCommunity Hero
If you are wondering WHY it worked .....
It's because "SetText" effectively just assigns a value to the field. This is NOT the same as someone entering a value. When you use "Keys" instead, this mimics the user actually typing. Which, in turn, will activate event triggers. The event trigger in your case being the enabling of the next field.
Although the docs suggest this should not be the case on web apps, which yours is: https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/edit/settext-action-edit-control.html
... I still prefer to always use "Keys" as it's the closest to actual user behaviour.
- AlexKaras8 years agoChampion Level 3
Hi,
> It's because "SetText" effectively just assigns a value to the field.
To be even more precise... It was stated for TestComplete 11.3 that SetText also fires the keydown, input and keyup events for web pages. However, I saw that a lot of 'modern and popular' web frameworks bound their jscript code to the events like OnKeyPress, OnKeyUp, etc. and it is my understanding that some of these events are not triggered when keydown, input and keyup events are fired.
Related Content
- 12 months ago
- 10 years ago
- 4 years ago
- 5 years ago
Recent Discussions
- 5 days ago
- 5 days ago