Monday, 14 July 2014

Easy way to provide the Search and Filter properties

If suppose there is a link and the following are the search and filter properties


SearchProperties[HtmlEdit.PropertyNames.Id] = "value"; 
SearchProperties[HtmlEdit.PropertyNames.Name] = "value"; 
FilterProperties[HtmlEdit.PropertyNames.LabeledBy] = null; 
FilterProperties[HtmlEdit.PropertyNames.Type] = "SINGLELINE/null"; 
FilterProperties[HtmlEdit.PropertyNames.Title] = null/value; 
FilterProperties[HtmlEdit.PropertyNames.Class] = "values/null"; 
FilterProperties[HtmlEdit.PropertyNames.ControlDefinition] = "values"; 
FilterProperties[HtmlEdit.PropertyNames.TagInstance] = "33"; 



Instead you can give those properties in one line as below

parentUIControl.SearchFor<HtmlEdit>( 
new { Id = "s", Name = "s" } , new { LabeledBy = null, Type = "SINGLELINE/null", Title = null / value, Class = "values/null", ControlDefinition = "values", TagInstance = "33"}    );