public WVM_PropertyAndOrderInformation btn_UploadFees_Click(int retryFind = 90) { //AndCondition andCond = new AndCondition( // new PropertyCondition(AutomationElement.NameProperty, "Upload Fees"), // new PropertyCondition(AutomationElement.LocalizedControlTypeProperty, "hyperlink") // ); UIAutomationClient.IUIAutomationPropertyCondition btn_UploadName = (UIAutomationClient.IUIAutomationPropertyCondition)UIA_Extensions.AUTOCLASS.CreatePropertyCondition(UIAutomationClient.UIA_PropertyIds.UIA_NamePropertyId, "Upload Fees"); UIAutomationClient.IUIAutomationPropertyCondition btn_UploadType = (UIAutomationClient.IUIAutomationPropertyCondition)UIA_Extensions.AUTOCLASS.CreatePropertyCondition(UIAutomationClient.UIA_PropertyIds.UIA_LocalizedControlTypePropertyId, "hyperlink"); UIAutomationClient.IUIAutomationAndCondition btn_Upload = (UIAutomationClient.IUIAutomationAndCondition)UIA_Extensions.AUTOCLASS.CreateAndConditionFromArray(new UIAutomationClient.IUIAutomationCondition[] { btn_UploadName, btn_UploadType }); UIAutomationClient.IUIAutomationElement button = UIA_Extensions.ROOT.FindFirst(UIAutomationClient.TreeScope.TreeScope_Descendants, btn_Upload); int i = 0; do { Thread.Sleep(1000); button = UIA_Extensions.ROOT.FindFirst(UIAutomationClient.TreeScope.TreeScope_Descendants, btn_Upload); i++; } while (button == null && i != retryFind); button.xtClickCenterOfBounds(); Thread.Sleep(10000); //aElement = aeScreen.FindFirst(TreeScope.Descendants, andCond); //aElement.ClickCenterOfBounds(); //setLegacyIAccessiblePattern(aElement); //if (patt_LegacyIAccessiblePattern.Current.DefaultAction == "Jump") // DoDefaultAction(aElement); return(this); }
public SmartFees_Fees btn_ExportToEncompasss_Click(int retryFind = 90) { UIAutomationClient.IUIAutomationPropertyCondition btn_ExportToEncompasss = (UIAutomationClient.IUIAutomationPropertyCondition)UIA_Extensions.AUTOCLASS.CreatePropertyCondition(UIAutomationClient.UIA_PropertyIds.UIA_AutomationIdPropertyId, "btn_submit"); UIAutomationClient.IUIAutomationElement button = UIA_Extensions.ROOT.FindFirst(UIAutomationClient.TreeScope.TreeScope_Descendants, btn_ExportToEncompasss); button.xtClickCenterOfBounds(); Thread.Sleep(10000); return(this); }