public void Press(string itemname) { AutomationElement menuitem = _getitem(itemname); try { UIAControlBase c = new UIAControlBase(new UIACondition(menuitem)); c.Click(3, 3); return; } catch { ControlSearcher.ThrowError(ErrorType.CannotPerformThisOperation); } }
public string SetCellValue(int rowindex, string columnname, string value) { AutomationElement iae = _getcell(rowindex, columnname); UIAControlBase ab = new UIAControlBase(new UIACondition(iae)); ab.Click(2, 2); ab.Set(value); if (ab.Value != "") { return(ab.Value); } if (ab.Text != "") { return(ab.Text); } return(""); }