public static bool OpenMainTabInForm(String mainTabName) { try { IControl tabHeader = DL_FormPage.GetMainTabHeaderInForm(mainTabName); return(Control_ActionUtilities.Click(tabHeader, String.Empty)); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool IsTabAvailable(string tabName, out bool verified) { verified = false; try { IControl tabHeader = DL_FormPage.GetMainTabHeaderInForm_NoWait(tabName); verified = true; return(!Control_PropertyUtilities.IsControlNull(tabHeader)); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
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); }