public void TestPDFReplacement()
        {
            LoginUser("username8", "password8");
            chyHelper = new ChyHelper(GetWebDriver(), "/PDFImportWizard2.xml");

            ImportPDFToClients();
            //Edit info to make inactive

            chyHelper.ClickElement("EditPDF/EditPDFInfoButton");
            chyHelper.ClickElement("EditPDF/ReplacePDFLink");

            chyHelper.Upload("ImportPDF/UploadPDFFile", Path.GetFullPath("../../Resources/MarineMPA.pdf"));
            chyHelper.WaitForWorkAround(3000);

            chyHelper.ClickElement("EditPDF/SaveChanges");
            chyHelper.WaitForWorkAround(2000);
            chyHelper.ClickElement("EditPDF/ClickPrintedNameField");
            chyHelper.VerifyPageText("1234.56");
        }
        public void TestPDFDetectSignatures()
        {
            LoginUser("username8", "password8");
            chyHelper = new ChyHelper(GetWebDriver(), "/PDFImportWizard2.xml");

            chyHelper.MouseHover("Navigate/PDFTemplatesTab");

            chyHelper.ClickElement("Navigate/PDFImportWizardTab");

            chyHelper.SelectByText("ImportPDF/SelectPDFModule", "Clients");

            chyHelper.Upload("ImportPDF/UploadPDFFile", Path.GetFullPath("../../Resources/MarineMPA.pdf"));
            chyHelper.WaitForWorkAround(2000);
            chyHelper.ClickElement("ImportPDF/ImportButton");

            chyHelper.WaitForWorkAround(2000);
            chyHelper.ClickElement("Navigate/NextButton");

            chyHelper.VerifyPageText("Signatures Found on PDF Document");

            chyHelper.ClickElement("ImportPDF/CancelButton");
            chyHelper.AcceptAlert();
            chyHelper.WaitForWorkAround(2000);
        }
        public void TestPDFFieldSearcher()
        {
            LoginUser("username8", "password8");
            chyHelper = new ChyHelper(GetWebDriver(), "/PDFImportWizard2.xml");

            chyHelper.MouseHover("Navigate/PDFTemplatesTab");

            chyHelper.ClickElement("Navigate/PDFImportWizardTab");

            chyHelper.SelectByText("ImportPDF/SelectPDFModule", "Clients");

            chyHelper.Upload("ImportPDF/UploadPDFFile", Path.GetFullPath("../../Resources/MarineMPA.pdf"));
            chyHelper.WaitForWorkAround(2000);
            chyHelper.ClickElement("ImportPDF/ImportButton");

            chyHelper.TypeText("ImportPDF/SearchPDFFileField", "Printed Name of Representative");
            chyHelper.WaitForWorkAround(2500);

            if (chyHelper.IsElementPresentLocator("ImportPDF/SearchListVisibleElement"))
            {
                Assert.IsTrue(true);
            }
            else
            {
                Assert.IsTrue(false);
            }
            chyHelper.ClickElement("ImportPDF/CancelButton");
            chyHelper.AcceptAlert();
            chyHelper.WaitForWorkAround(2000);
        }
        public void TestFieldGroupingTemplate()
        {
            //Create Template
            LoginUser("username9", "password9");
            chyHelper = new ChyHelper(GetWebDriver(), "/OfficeFieldDictionary.xml");

            Random rand = new Random();
            int nameInt = rand.Next(1, 1000);
            string fieldTemplateName ="Test Template "+nameInt;

            chyHelper.MouseHover("Navigate/UserName");
            chyHelper.ClickElement("Navigate/AdminTab");
            chyHelper.WaitForWorkAround(1500);
            chyHelper.MouseHover("Navigate/FieldDictionaryTab");
            chyHelper.ClickElement("Navigate/FieldGroupingTab");

            chyHelper.ClickElement("GroupingTemplate/CreateNewButton");
            chyHelper.TypeText("GroupingTemplate/EnterName",fieldTemplateName);
            chyHelper.SelectByText("GroupingTemplate/SelectModule", "Clients");
            chyHelper.WaitForWorkAround(2000);

            chyHelper.SelectByText("GroupingTemplate/SelectTab", "Company Details");
            chyHelper.SelectByText("GroupingTemplate/SelectField", "Company DBA Name");

            chyHelper.ClickElement("GroupingTemplate/AddFieldButton");
            chyHelper.ClickElement("GroupingTemplate/SaveButton");

            //Check selections in pdf import wizard
            chyHelper.MouseHover("Navigate/PDFTemplatesTab");

            chyHelper.ClickElement("Navigate/PDFImportWizardTab");

            chyHelper.SelectByText("ImportPDF/SelectPDFModule", "Clients");

            chyHelper.Upload("ImportPDF/UploadPDFFile", Path.GetFullPath("../../Resources/MarineMPA.pdf"));
            chyHelper.WaitForWorkAround(2000);
            chyHelper.ClickElement("ImportPDF/ImportButton");
            chyHelper.WaitForWorkAround(2000);
            chyHelper.ClickElement("GroupingTemplate/SelectMappingByTemplate");
            chyHelper.SelectByText("GroupingTemplate/SelectTemplateName", fieldTemplateName);
            chyHelper.SelectByText("GroupingTemplate/SelectTab", "Company Details");
            chyHelper.WaitForWorkAround(2000);

            //determines if test failed or not by what options are in menu
            bool isThere = chyHelper.CheckSelectOptionThere("GroupingTemplate/SelectField", "Company Legal Name");

            if (isThere == true)
                Assert.IsTrue(false);
            else
                Assert.IsTrue(true);

            isThere = chyHelper.CheckSelectOptionThere("GroupingTemplate/SelectField", "Company DBA Name");

            if (isThere == true)
                Assert.IsTrue(true);
            else
                Assert.IsTrue(false);
        }