public static bool VerifyJobStatus(String process, String expectedStatus)
        {
            int  i     = 0;
            bool found = false;

            try
            {
                while (i < 60 && !found)
                {
                    BrowserUtilities.RefreshPage();
                    IControl cell = GetStatusCell(process, expectedStatus);

                    if (!Control_PropertyUtilities.IsControlNull(cell))
                    {
                        String actualText = Control_PropertyUtilities.GetText(cell);
                        found = actualText.Equals(expectedStatus, StringComparison.InvariantCultureIgnoreCase);
                    }
                    Thread.Sleep(5000);
                    ++i;
                }
            }
            catch (Exception e)
            {
            }
            return(found);
        }
示例#2
0
        public static bool VerifyDCF(CRF_DCFTabData data)
        {
            bool retVal = false;
            int  i      = 0;

            try
            {
                while (retVal || i < 120)
                {
                    ++i;
                    IControl row = GetRowFromActiveDCFsSubTab(data);
                    retVal = !Control_PropertyUtilities.IsControlNull(row);
                    Thread.Sleep(1000);
                    if (!retVal)
                    {
                        BrowserUtilities.RefreshPage();
                        BP_FormUtilities.OpenMainTabInForm("DCFs");
                        OpenSubTabUnderDCFTab("All");
                    }
                    else
                    {
                        return(retVal);
                    }
                }
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(retVal);
        }
 public void WhenIRefreshThePage()
 {
     if (!BrowserUtilities.RefreshPage())
     {
         ScenarioContext.Current["ActResult"] = "Failed";
     }
 }
示例#4
0
 public void ThenIDoNotSeeTheTab(string TabName)
 {
     BrowserUtilities.RefreshPage();
     if (!DS_BP_StudyProperties.VerifytabNotPresent(TabName))
     {
         ScenarioContext.Current["ActResult"] = "Failed";
     }
 }
        public static bool CheckInbox_NormalizationSubject_FromTop(String folderName, List <String> subjectList)
        {
            int  counter      = 0;
            bool jobsFinished = false;

            try
            {
                BP_Inbox_ActionPaletteUtilities.InvokeActionPaletteItem(folderName);
                while (counter <= 60 && !jobsFinished)
                {
                    Thread.Sleep(5 * 1000);
                    BrowserUtilities.RefreshPage();
                    jobsFinished = AreNormalizationJobsFinished(subjectList);
                    ++counter;
                }
            }
            catch (Exception e)
            {
            }
            return(jobsFinished);
        }
示例#6
0
        public static bool UploadStudyFile(String studyFileName)
        {
            try
            {
                //string assemblyFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

                String startupPath   = AppDomain.CurrentDomain.BaseDirectory;
                String studiesFolder = String.Empty;
                if (startupPath.EndsWith("\\"))
                {
                    studiesFolder = startupPath.Replace("EDC_Automation\\bin\\Debug\\", "BusinessProcesses\\Designer\\LabDictFiles\\");
                }
                else
                {
                    studiesFolder = startupPath.Replace("EDC_Automation\\bin\\Debug", "BusinessProcesses\\Designer\\LabDictFiles\\");
                }

                Thread.Sleep(2000);
                //studyFileName = studyFileName.Replace(@"\", @"\\");
                String fullFolderPath = studiesFolder + studyFileName;
                SendKeys.SendWait(fullFolderPath);
                Thread.Sleep(1000);
                SendKeys.SendWait(@"{Enter}");
                Thread.Sleep(1000);

                DS_UploadLabDictUtilities.ClickContinueButton();
                Thread.Sleep(10 * 5000);
                BrowserUtilities.RefreshPage();
                return(true);
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
                return(false);
            }
        }