static bool AreJobsFinished(List <String> subjectList)
 {
     try
     {
         ReadOnlyCollection <IControl> rows = WebTableUtilities.GetRows(Pages.DataLabs.Inbox.DL_InboxPage.InboxTable);
         if (rows.Count > subjectList.Count)
         {
             int i = 1;
             foreach (String subjectText in subjectList)
             {
                 IControl c = WebTableUtilities.GetElement(rows[i], subjectText, 3, TableColumnContentType.Link_Partial);
                 if (Control_PropertyUtilities.IsControlNull(c))
                 {
                     return(false);
                 }
                 ++i;
             }
             return(true);
         }
     }
     catch (Exception e)
     {
     }
     return(false);
 }
 public static bool ExpandEvent(String eventName, out String identifier)
 {
     identifier = String.Empty;
     try
     {
         ReadOnlyCollection <IControl> rows = WebTableUtilities.GetRows(DL_CRF_PDEP_EventsPage.EventsTable);
         foreach (IControl row in rows)
         {
             if (Control_PropertyUtilities.IsControlVisible(row))
             {
                 IControl cell = WebTableUtilities.GetCell(row, 0);
                 if (Control_PropertyUtilities.GetText(cell).Equals(eventName, StringComparison.InvariantCultureIgnoreCase))
                 {
                     IControl expandCollapseImage = WebTableUtilities.GetElement(row, String.Empty, 0, TableColumnContentType.Image);
                     bool     found       = false;
                     String   imageSource = Control_PropertyUtilities.GetAttributeValue(expandCollapseImage, "src", out found);
                     if (found)
                     {
                         identifier = Control_PropertyUtilities.GetAttributeValue(row, "identifier", out found);
                         if (imageSource.Contains("menu_expand.gif"))
                         {
                             return(Control_ActionUtilities.Click(expandCollapseImage, String.Empty));
                         }
                         return(imageSource.Contains("menu_collapse.gif"));
                     }
                 }
             }
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool ClickInboxItem(String folderName, String subject)
 {
     try
     {
         int i = 0;
         while (i < 25)
         {
             if (BP_Inbox_ActionPaletteUtilities.InvokeActionPaletteItem(folderName))
             {
                 ReadOnlyCollection <IControl> rows = WebTableUtilities.GetRows(Pages.DataLabs.Inbox.DL_InboxPage.InboxTable);
                 foreach (IControl row in rows)
                 {
                     IControl c = WebTableUtilities.GetElement(row, subject, 3, TableColumnContentType.Link_Partial);
                     if (!Control_PropertyUtilities.IsControlNull(c))
                     {
                         return(Control_ActionUtilities.Click(c, "Unbale to click inbox item for subject " + subject));
                     }
                 }
             }
             ++i;
             Thread.Sleep(5000);
         }
     }
     catch (Exception e)
     {
     }
     return(false);
 }
 public static int GetRowCount(IControl webTable, out ReadOnlyCollection <IControl> rows)
 {
     rows = null;
     if (webTable != null && webTable.WebElement != null)
     {
         rows = WebTableUtilities.GetRows(webTable);
         return(rows.Count);
     }
     return(0);
 }