UITestControl GetControlByFriendlyName(string name) { var sqlBulkInsert = WorkflowDesignerUIMap.FindControlByAutomationId(TabManagerUIMap.GetActiveTab(), "SqlBulkInsertDesigner"); var uiTestControls = WorkflowDesignerUIMap.GetSqlBulkInsertChildren(sqlBulkInsert); return(uiTestControls.FirstOrDefault(c => c.FriendlyName.Contains(name))); }
UITestControl GetControlById(string autoId, UITestControl theTab) { var sqlBulkInsert = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "SqlBulkInsertDesigner"); var uiTestControls = WorkflowDesignerUIMap.GetSqlBulkInsertChildren(sqlBulkInsert); var result = uiTestControls.FirstOrDefault(c => c.AutomationId.Equals(autoId)); if (result != null) { result.WaitForControlReady(); } return(result); }