public string GetControlColor(string controlIdOrText, int ordinal, string parentId) { var command = new GetColorCommand { AutomationIdentifier = CreateAutomationIdentifier(controlIdOrText), Ordinal = ordinal, ParentIdentifier = CreateAutomationIdentifier(parentId) }; var result = SyncExecuteCommand(command); var successResult = result as SuccessResultColor; return(successResult == null ? string.Empty : successResult.ResultColor); }
public string GetControlColor(string controlIdOrText, int ordinal, string parentId) { var command = new GetColorCommand { AutomationIdentifier = CreateAutomationIdentifier(controlIdOrText), Ordinal = ordinal, ParentIdentifier = CreateAutomationIdentifier(parentId) }; var result = SyncExecuteCommand(command); var successResult = result as SuccessResultColor; return successResult == null ? string.Empty : successResult.ResultColor; }