Forum Discussion
It's possible that the code for that component has some event tied to it for "onexit" or something like that. So, if you don't actually click in the field and then click away, it's possible that the text never actually gets set. Try changing "SetText" to "Keys" and see if that works better.
- salley9 years agoFrequent Contributor
Right, it's more like a search field, as you start to type in recommended list of class codes displays in drop down, but if keyed in value i need to select the class from the list. that's the only way. i've tried your method, it does key in the value but doesn't get set. i've attached a screen shot
thanks
- tristaanogre9 years agoEsteemed Contributor
In that case, using the Keys method, add [Enter] at the end of the string. This will send the Enter keystroke to the field after typing in the value. I'm assuming that will, effectively, select the item.
Alternative: Take another look at the methods available on the control. If it's a "Select" type web component or similar control, there may be a "ClickItem" method on it that might simplify things. If not, I think the Enter key method will work.
- salley9 years agoFrequent Contributor
Thanks, a lot. but that didn't help, can you please provide an example, see my attachment
thanks