public static bool OpenSubTabUnderDCFTab(String dcfSubTabName) { try { IControl tabHeader = DL_FormPage.GetSubTabUnderDCFTabInForm(dcfSubTabName); Control_ActionUtilities.Click(DL_FormPage.GetSubtabHeaderLinkToOpen(tabHeader, dcfSubTabName), String.Empty); IControl openedTabHeader = DL_FormPage.GetSubTabUnderDCFTabInForm(dcfSubTabName); bool found = false; String value = Control_PropertyUtilities.GetAttributeValue(openedTabHeader, "class", out found); return(found && value.Contains("selected")); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
static int GetNumberOfQueriesFromHeaderText(String dcfSubTabName) { try { IControl tabHeader = DL_FormPage.GetSubTabUnderDCFTabInForm(dcfSubTabName); String text = Control_PropertyUtilities.GetText(tabHeader); if (!String.IsNullOrEmpty(text)) { String s1 = text.Replace(dcfSubTabName, String.Empty); String s2 = s1.Replace("(", String.Empty); String s3 = s2.Replace(")", String.Empty); int queryCount = -1; if (int.TryParse(s3, out queryCount)) { return(queryCount); } } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(-1); }