Forum Discussion
tvklovesu
2 years agoFrequent Contributor
Just wondering, can't you use SetText() instead of Keys(). SetText works seamlessly.
- Marsha_R2 years agoModerator
tvklovesu wrote:
Just wondering, can't you use SetText() instead of Keys(). SetText works seamlessly.
lol I have found it to be the exact opposite - SetText doesn't work where I need it and Keys always does
- jaredjamieson2 years agoOccasional ContributorThat is what I have noticed. I cannot use SetText() on the same objects I can use Keys().
- Marsha_R2 years agoModerator
Keys is meant to mimic a person typing so I would expect it to work anywhere. SetText is changing a property internally and the code under test may not react well with that, for instance the UI would not know that there was a new value in a field so even though you set the value you could not see it.
What version of TC are you using? Did this work for you before your last update or is this something new you are trying?
Related Content
- 13 years ago
- 4 years ago
- 3 years ago
- 4 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 6 days ago