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.
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
- tristaanogre9 years agoEsteemed Contributor
Change to this:
sPage.Form("form1").Panel("UpdWindow").Table(0).Cell(1, 1).Frame("UpdWindow").Form("form1").Panel(2).Panel("content").Table("conForm_mainTbl").Cell(1, 1).Panel("ClassCd").Table(0).Cell(0, 0).Textbox("Input").Keys("2157 - Bottling All Ops & Rte Superv Drivers[Enter]")where the Enter is part of the actual key entry in the input field. Let me know if this works.