private boolean setValueWithJs ( final String componentId , final String value ) { boolean selected ; String script = "return (function(){var c = Ext.getCmp('" + componentId + "'); var record = c.findRecord(c.displayField, '" + value + "');" + "if(record){c.onSelect(record, c.store.indexOf(record)); return true;} return false;})()" ; log . warn ( "force ComboBox Value with js: " + script ) ; selected = ( Boolean ) WebLocatorUtils . doExecuteScript ( script ) ; log . warn ( "force ComboBox select result: " + selected ) ; return selected ; }
this method is used in case normal flow for selection fails