예제 #1
0
        /// <summary> Login to Intact: Has to be ran before any other testcase</summary>
        public void Login()
        {
            bool needToSetDB = ConfigurationManager.AppSettings.Get("setDataBase") == "true";

            Thread.Sleep(10000);
            m.SendKeys(By.Name(""), "admin");
            if (needToSetDB)
            {
                SetDatabaseInformation();
            }
            m.Click(By.Name("&Logon"));
            Thread.Sleep(2000);
        }
예제 #2
0
        /// <summary>
        /// This is going to a specified amount of definitions with random name for each blank
        /// </summary>
        public void CreateNewDefinition(int?numberOfDefinitions = 1, string definitionName = "")
        {
            method = MethodBase.GetCurrentMethod().Name;
            Print("Started", method);
            //check if maximized
            window = m.Locate(By.Id("frmIntactMain"));
            if (m.IsElementPresent(By.Name("Maximize"), window))
            {
                m.Click(By.Name("Maximize"), window);
            }
            window = m.Locate(By.Name("radMenu1"), window);
            m.Click(By.Name("&Administration"), window);
            window = m.Locate(By.Name("&Administration"), window);
            m.Click(By.Name("Definitions"), window);

            if (definitionName.Length < 2)
            {
                definitionName = "Test";
            }

            for (int i = 0; i <= numberOfDefinitions; i++)
            {
                var num = new Random().Next().ToString();
                window = m.Locate(By.Id("frmRulesList"), m.Locate(By.Id("frmIntactMain")));
                m.Click(By.Id("btnAdd"), window);
                window = m.Locate(By.Name("Add Definition"));
                Print("Definition name is " + definitionName + num, method);
                foreach (IWebElement element in window.FindElements(By.Name("")))
                {
                    if (element.Enabled == true)
                    {
                        try { element.SendKeys(definitionName + " " + num); } catch (Exception) { }
                    }
                }
                m.Click(By.Name("&Save"), window);
            }

            m.Click(By.Name("&Close"));
            Print("Finished", method);
        }
예제 #3
0
 public void OpenOrganizer()
 {
     method = MethodBase.GetCurrentMethod().Name;
     Print(method, " Started");
     m.Click(By.Name("Organizer"));
     Print(method, " Finished");
 }
예제 #4
0
        /// <summary> This method is going to add documents to batch review and then run through and both add a document to an existing document and attribute a new one.</summary>
        public void BatchReview(TestCaseObject tcase)
        {
            pt(i);
            method = MethodBase.GetCurrentMethod().Name;
            AddDocsToCollector();

            window = m.Locate(By.Id("frmIntactMain"));
            handler.GetActiveWindow();
            var mainIntact = handler.WindowProcess;

            window = m.Locate(By.Id("radPanelBar1"), window);
            window = m.Locate(By.Id("pageIntact"), window);
            window = m.Locate(By.Id("lstIntact"), window);
            m.Click(By.Name("Batch Review"), window);
            Thread.Sleep(1000);
            m.Click(By.Id("6"));
            Thread.Sleep(1000);
            m.Click(By.Id("6"));


            //attribute test from batch review...
            BatchCreate(tcase);

            //add to document test from batch review...
            AddDocBatchReview();

            m.Click(By.Id("btnClose"));
            handler.SetAsActiveWindow(mainIntact);
            pt(i);
        }
 private void AddRecognition()
 {
     m.Click(By.Name("Recognize"));
     window = m.Locate(By.Id("frmMainInteractive"));
     Thread.Sleep(1500);
     window = m.Locate(By.Id("btnSelect"), window);
     m.Click(By.Name("Select All"), window);
     m.Click(By.Id("btnRecgonize"));
     Thread.Sleep(5000);
     m.Click(By.Id("btnClose"));
 }