static IControl GetFormRow(String eventName, String formName, out IControl formCell)
        {
            formCell = null;
            String identifier = String.Empty;

            try
            {
                if (ExpandEvent(eventName, out identifier) && !String.IsNullOrEmpty(identifier))
                {
                    ReadOnlyCollection <IControl> rows = DL_CRF_PDEP_EventsPage.GetRowsEventRows(identifier);
                    foreach (IControl row in rows)
                    {
                        if (Control_PropertyUtilities.IsControlVisible(row))
                        {
                            formCell = WebTableUtilities.GetCell(row, 2);
                            String formText = Control_PropertyUtilities.GetText(formCell);
                            if (formName.Equals(formText, StringComparison.InvariantCultureIgnoreCase))
                            {
                                return(row);
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(null);
        }
 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 VerifyLabsAssociatedSuccessMsg()
 {
     if (!Control_PropertyUtilities.IsControlNull(DL_AddLabPage.LabAssSuccessMsg))
     {
         return(Control_PropertyUtilities.IsControlVisible(DL_AddLabPage.LabAssSuccessMsg));
     }
     else
     {
         return(false);
     }
 }
        public static String GetErrorString(String columnName)
        {
            IControl statusRow = WebTableUtilities.Table_FindRow(DL_AddLabPage.AddLabTable, GetSearchItemList(columnName));
            IControl span      = WebTableUtilities.GetElement(statusRow, String.Empty, 1, TableColumnContentType.Span);

            if (Control_PropertyUtilities.IsControlVisible(span))
            {
                return(Control_PropertyUtilities.GetText(span));
            }
            return(String.Empty);
        }
Exemple #5
0
 public static bool VerifyLabsIcon()
 {
     try
     {
         return((Control_PropertyUtilities.IsControlVisible(DS_StudyProperties.LabsIcon)));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Exemple #6
0
 public static bool MessageNotDisplayedUponLabsDropDownSelectionToYes(String message)
 {
     try
     {
         return(!(Control_PropertyUtilities.IsControlVisible(DS_StudyProperties.LabMessageonSelectionOfNoOption)));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Exemple #7
0
 public static bool VerifytabNotPresent(String TabName)
 {
     try
     {
         return(!Control_PropertyUtilities.IsControlVisible(DS_StudyProperties.Tab(TabName)));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
         return(false);
     }
 }
Exemple #8
0
 public static bool VerifyDesignerPageHeader()
 {
     try
     {
         return(Control_PropertyUtilities.IsControlVisible(MapLabDictionary.HeaderText_H1()));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Exemple #9
0
 public static bool ControlIsVisible(String linkName)
 {
     try
     {
         return(Control_PropertyUtilities.IsControlVisible(DS_HomePage.GetLink(linkName)));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Exemple #10
0
 public static bool DesignerCodelistspage()
 {
     try
     {
         return(Control_PropertyUtilities.IsControlVisible(DS_HomePage.CodelistsPage));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Exemple #11
0
 public static bool IsAttestationEditable()
 {
     try
     {
         return(Control_PropertyUtilities.IsControlVisible(DL_PISignaturePage.AttestationTextArea) &&
                !Control_PropertyUtilities.IsControlDisabled(DL_PISignaturePage.AttestationTextArea));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
 public static bool VerifyAddAndDeleteButtons()
 {
     try
     {
         return(Control_PropertyUtilities.IsControlVisible(DL_Lab_ManageReferenceRanges_Actions.Add_Button) &&
                Control_PropertyUtilities.IsControlVisible(DL_Lab_ManageReferenceRanges_Actions.Delete_Button));
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
         return(false);
     }
 }
 public static Boolean ValidateUserIsOnLabMappingsTab()
 {
     try
     {
         if (Control_PropertyUtilities.IsControlVisible(DS_StudyProperties.Tab("Lab Mappings")))
         {
             return(true);
         }
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }
Exemple #14
0
 static IControl GetIcon(IControl questionHost, String iconName, string flagType = null)
 {
     if (questionHost != null)
     {
         ReadOnlyCollection <IControl> imageControlList = SyncUtilities.FindVisibleElements_Parent(questionHost.WebElement, By.TagName("img"));
         foreach (IControl image in imageControlList)
         {
             if (IsImageSourceMatched(iconName, image, flagType))
             {
                 if (Control_PropertyUtilities.IsControlVisible(image))
                 {
                     return(image);
                 }
             }
         }
     }
     return(null);
 }
Exemple #15
0
        public static bool SelecttheTab(IEnumerable <Tabs> tabNames)
        {
            bool tabName = false;

            try
            {
                foreach (Tabs tab  in tabNames)
                {
                    IControl tabNameFromApplication = DS_StudyProperties.Tab(tab.TabName);
                    tabName = Control_PropertyUtilities.IsControlVisible(tabNameFromApplication);
                    if (tabName.Equals("false"))
                    {
                        return(false);
                    }
                }
                return(tabName);
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }
 public static bool VerifyDisplayModalPopup()
 {
     return(Control_PropertyUtilities.IsControlVisible(ManageLabsPage.LabDictContinue));
 }