public string GetAllText(AutomationElement control) { try { string retVal = TextPatternHelper.GetText(UIAElement, -1); LogText = "Text: " + retVal; LogMessage(); return(retVal); } catch (ProdOperationException err) { throw; } }
public string GetSelectedText() { try { TextPatternRange[] selected = TextPatternHelper.GetSelection(UIAElement); string retVal = selected[0].GetText(-1); LogText = "Text: " + retVal; LogMessage(); return(retVal); } catch (ProdOperationException err) { throw; } }
public List <object> GetMultiSelectedText() { if (TextPatternHelper.GetSupportedTextSelection(UIAElement) == SupportedTextSelection.Single) { return(null); } try { TextPatternRange[] selected = TextPatternHelper.GetSelection(UIAElement); List <object> retVal = new List <object>(selected); LogText = "Text"; VerboseInformation = retVal; LogMessage(); return(retVal); } catch (ProdOperationException err) { throw; } }