Example #1
0
        public void createPDFPackage()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username_office");
            password = oXMLData.getData("settings/Credentials", "password");

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var pDFTemplate_PDFTemplateHelper = new PDFTemplate_PDFTemplateHelper(GetWebDriver());


            // Variable random
            var    name   = "TESTCLIENT" + RandomNumber(1, 999);
            String JIRA   = "";
            String Status = "Pass";

            try
            {
                executionLog.Log("CreatePDFPackages", "Login with valid username and password");
                Login(username[0], password[0]);

                executionLog.Log("CreatePDFPackages", "Verify Page title");
                VerifyTitle("Dashboard");

                executionLog.Log("CreatePDFPackages", "Redirect To Admin");
                VisitOffice("admin");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000);

                executionLog.Log("CreatePDFPackages", "Click on Menu Icon");
                // pDFTemplate_PDFTemplateHelper.ClickElement("MenuIcon");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(1000);

                executionLog.Log("CreatePDFPackages", "ClickOnPdfTab");
                pDFTemplate_PDFTemplateHelper.MouseOverAndWait("PdfTab", 2);
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000);

                executionLog.Log("CreatePDFPackages", "Click on PDF Template button");
                pDFTemplate_PDFTemplateHelper.ClickJs("PdfTempBtn");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000);

                executionLog.Log("CreatePDFPackages", "Click on pdf pakage.");
                pDFTemplate_PDFTemplateHelper.ClickElement("PDFPackage");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                executionLog.Log("CreatePDFPackages", "Enter pakage name");
                pDFTemplate_PDFTemplateHelper.TypeText("PackagePDFName", "Test Pakage");

                executionLog.Log("CreatePDFPackages", "Select Module");
                pDFTemplate_PDFTemplateHelper.SelectByText("SelectModulePakage", "Clients");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000);

                executionLog.Log("CreatePDFPackages", "Select");
                pDFTemplate_PDFTemplateHelper.SelectByText("SelectPDFTemplate", "2");

                executionLog.Log("CreatePDFPackages", "SelectCategoryPackage");
                pDFTemplate_PDFTemplateHelper.SelectByText("SelectCategoryPackage", "Other");

                executionLog.Log("CreatePDFPackages", "Save PDF Package");
                pDFTemplate_PDFTemplateHelper.ClickElement("SavePDFPakage");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000);

                executionLog.Log("CreatePDFPackages", "Wait for success message");
                pDFTemplate_PDFTemplateHelper.WaitForText("PDF Package Template Created Successfully.", 10);

                executionLog.Log("CreatePDFPackages", "Redirect to templates page");
                VisitOffice("pdf_templates");

                executionLog.Log("CreatePDFPackages", "Verify title");
                VerifyTitle("PDF Templates");

                executionLog.Log("CreatePDFPackages", "Search pdf template ");
                pDFTemplate_PDFTemplateHelper.TypeText("SearchPDF", "Test Pakage");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000);

                executionLog.Log("CreatePDFPackages", "Select template type pakage ");
                pDFTemplate_PDFTemplateHelper.Select("SelectType", "1");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000);

                executionLog.Log("CreatePDFPackages", "Select first pdf");
                pDFTemplate_PDFTemplateHelper.ClickElement("Checkbox1");

                executionLog.Log("CreatePDFPackages", "Click on delete button ");
                pDFTemplate_PDFTemplateHelper.ClickElement("DeletePdf");

                executionLog.Log("CreatePDFPackages", "Accept alert message. ");
                pDFTemplate_PDFTemplateHelper.AcceptAlert();

                executionLog.Log("CreatePDFPackages", "Wait for message ");
                pDFTemplate_PDFTemplateHelper.WaitForText("PDF Template Deleted Successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("CreatePDFPackages");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Create PDF Packages");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Create PDF Packages", "Bug", "Medium", "Pdf Template page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Create PDF Packages");
                        TakeScreenshot("CreatePDFPackages");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CreatePDFPackages.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("CreatePDFPackages");
                        string id            = loginHelper.getIssueID("Create PDF Packages");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CreatePDFPackages.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Create PDF Packages"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Create PDF Packages");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("CreatePDFPackages");
                executionLog.WriteInExcel("Create PDF Packages", Status, JIRA, "PDF Template");
            }
        }
        public void verifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username_office");
            password = oXMLData.getData("settings/Credentials", "password");

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var pDFTemplate_PDFTemplateHelper = new PDFTemplate_PDFTemplateHelper(GetWebDriver());
            var office_ClientsHelper          = new Office_ClientsHelper(GetWebDriver());
            var pdffilesHelper = new PDFfilesHelper(GetWebDriver());

            // Variable
            var    name   = "Test" + GetRandomNumber();
            var    name2  = "Testlist" + GetRandomNumber();
            var    Id     = "12345" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

            try
            {
                executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Go to PDF templates page");
                VisitOffice("pdf_templates");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Search for required pdf");
                pDFTemplate_PDFTemplateHelper.TypeText("EnterPDFToSearch", "Clone of CoCardEnhancedBillback2105_ia_Final co-br");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Click on PDF Halo Edit");
                pDFTemplate_PDFTemplateHelper.ClickElement("PDFHaloEdit");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);
                pDFTemplate_PDFTemplateHelper.ClickElement("SelectVisualMap");
                pDFTemplate_PDFTemplateHelper.ClickElement("SubmitMapOptn");
                pDFTemplate_PDFTemplateHelper.WaitForElementPresent("//input[@name='visaPartialAuth']", 20);

                executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Check mapping");
                pdffilesHelper.ClickElement("VisaCredit_DiscRate");
                pdffilesHelper.WaitForWorkAround(3000);
                string tab1     = pdffilesHelper.getInputText("//*[@id='directmapdiv']/div[2]/div[1]/div[1]/div/button");
                string section1 = pdffilesHelper.getInputText("//*[@id='directmapdiv']/div[2]/div[1]/div[2]/div/button");
                string field1   = pdffilesHelper.getInputText("//*[@id='directmapdiv']/div[2]/div[1]/div[4]/div/button");

                GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/pegasustestoffice/clients/view/200866");
                pdffilesHelper.WaitForWorkAround(2000);
                if (tab1 == "Rates & Fees")
                {
                    office_ClientsHelper.ClickElement("RatesAndFee");
                }
                else
                {
                }

                //Boolean test = Assert.IsTrue(pDFTemplate_PDFTemplateHelper.IsElementPresent("//*[@id='ClientRatesFeeAmexRate']"));
                if (office_ClientsHelper.IsElementPresent("//*[@id='ClientRatesFeeAmexRate']") == true)
                {
                    office_ClientsHelper.TypeText("Amexp", "61");
                    office_ClientsHelper.ClickElement("RandFSave");
                    office_ClientsHelper.WaitForWorkAround(2000);
                }
                else
                {
                }

                GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/pegasustestoffice/clients/pdfs/200866/html/602450");
                office_ClientsHelper.WaitForWorkAround(4000);

                string value = pDFTemplate_PDFTemplateHelper.getInputText("//*[@id='qualRate']");

                Assert.AreEqual("61", value);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("CustomColumnsLead");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Custom Columns Lead");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Custom Columns Lead", "Bug", "Medium", "Equipment page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Custom Columns Lead");
                        TakeScreenshot("CustomColumnsLead");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CustomColumnsLead.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("CustomColumnsLead");
                        string id            = loginHelper.getIssueID("Custom Columns Lead");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CustomColumnsLead.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Custom Columns Lead"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Custom Columns Lead");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("CustomColumnsLead");
                executionLog.WriteInExcel("Custom Columns Lead", Status, JIRA, "List Management");
            }
        }
Example #3
0
        public void makeStatusActivePDFTemplate()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username_office");
            password = oXMLData.getData("settings/Credentials", "password");

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var pDFTemplate_PDFTemplateHelper = new PDFTemplate_PDFTemplateHelper(GetWebDriver());


            // Variable random
            String Status = "Pass";
            String JIRA   = "";

            try
            {
                executionLog.Log("MakeStatusActivePDFTemplate", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("MakeStatusActivePDFTemplate", "Verify Page title");
                VerifyTitle("Dashboard");
                Console.WriteLine("Redirected at Dashboard screen.");

                executionLog.Log("MakeStatusActivePDFTemplate", "Redirect To pdf template");
                VisitOffice("pdf_templates");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000);

                executionLog.Log("MakeStatusActivePDFTemplate", "Enter PDF TO sEARCH");
                pDFTemplate_PDFTemplateHelper.TypeText("EnterPDFToSearch", "2.pdf");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                executionLog.Log("MakeStatusActivePDFTemplate", "SelectModuleToSearch");
                pDFTemplate_PDFTemplateHelper.Select("SelectModuleToSearch", "merchants");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                var loc = "//table[@id='list1']/tbody/tr[2]";
                if (pDFTemplate_PDFTemplateHelper.IsElementPresent(loc))
                {
                    executionLog.Log("MakeStatusActivePDFTemplate", "Click on edit icon");
                    pDFTemplate_PDFTemplateHelper.ClickElement("ClickOnEdit");
                    pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                    executionLog.Log("MakeStatusActivePDFTemplate", "Select status as Inactive.");
                    pDFTemplate_PDFTemplateHelper.Select("SelectStatusDeactive", "0");
                    pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                    executionLog.Log("MakeStatusActivePDFTemplate", "Click Save button");
                    pDFTemplate_PDFTemplateHelper.ClickElement("SaveEdit");

                    executionLog.Log("MakeStatusActivePDFTemplate", "Verify message");
                    pDFTemplate_PDFTemplateHelper.WaitForText("PDF Template Updated Successfully.", 10);
                }
                else
                {
                    executionLog.Log("MakeStatusActivePDFTemplate", "Redirect To Import");
                    VisitOffice("pdf_templates/import");
                    pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                    executionLog.Log("MakeStatusActivePDFTemplate", "ChooseModule");
                    pDFTemplate_PDFTemplateHelper.Select("SelectModule", "20");
                    pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                    var path = GetPathToFile() + "2.pdf";
                    executionLog.Log("MakeStatusActivePDFTemplate", "Upload a pdf file.");
                    pDFTemplate_PDFTemplateHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", path);

                    executionLog.Log("MakeStatusActivePDFTemplate", "Click import");
                    pDFTemplate_PDFTemplateHelper.ClickElement("Import");
                    pDFTemplate_PDFTemplateHelper.WaitForWorkAround(4000);

                    executionLog.Log("MakeStatusActivePDFTemplate", "ClickOnNext");
                    pDFTemplate_PDFTemplateHelper.ClickElement("ClickOnNext");

                    executionLog.Log("MakeStatusActivePDFTemplate", "Select Category");
                    pDFTemplate_PDFTemplateHelper.SelectByText("SelectCategory", "Other");

                    executionLog.Log("MakeStatusActivePDFTemplate", "Save");
                    pDFTemplate_PDFTemplateHelper.ClickElement("Save");

                    executionLog.Log("MakeStatusActivePDFTemplate", "Verify message");
                    pDFTemplate_PDFTemplateHelper.WaitForText("PDF Template options saved successfully.", 10);

                    executionLog.Log("MakeStatusActivePDFTemplate", "Enter PDF TO sEARCH");
                    pDFTemplate_PDFTemplateHelper.TypeText("EnterPDFToSearch", "2.pdf");
                    pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                    executionLog.Log("MakeStatusActivePDFTemplate", "SelectModuleToSearch");
                    pDFTemplate_PDFTemplateHelper.Select("SelectModuleToSearch", "merchants");
                    pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                    executionLog.Log("MakeStatusActivePDFTemplate", "Click on pdf");
                    pDFTemplate_PDFTemplateHelper.ClickElement("EditFirstTemplate");
                    pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                    executionLog.Log("MakeStatusActivePDFTemplate", "Select status as active.");
                    pDFTemplate_PDFTemplateHelper.Select("SelectStatusDeactive", "1");

                    executionLog.Log("MakeStatusActivePDFTemplate", "Click on save button.");
                    pDFTemplate_PDFTemplateHelper.ClickElement("SaveEdit");

                    executionLog.Log("MakeStatusActivePDFTemplate", "Verify message");
                    pDFTemplate_PDFTemplateHelper.WaitForText("PDF Template Updated Successfully.", 10);
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";
                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("MakeStatusActivePDFTemplate");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Make Status Active PDF Template");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Make Status Active PDF Template", "Bug", "Medium", "Pdf page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Make Status Active PDF Template");
                        TakeScreenshot("MakeStatusActivePDFTemplate");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\MakeStatusActivePDFTemplate.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("MakeStatusActivePDFTemplate");
                        string id            = loginHelper.getIssueID("Make Status Active PDF Template");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\MakeStatusActivePDFTemplate.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Make Status Active PDF Template"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Make Status Active PDF Template");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("MakeStatusActivePDFTemplate");
                executionLog.WriteInExcel("Make Status Active PDF Template", Status, JIRA, "PDF Template.");
            }
        }
Example #4
0
        public void pDFImpotWizard()
        {
            string[] username  = null;
            string[] username1 = null;
            string[] password  = null;

            var oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username  = oXMLData.getData("settings/Credentials", "username_corp");
            username1 = oXMLData.getData("settings/Credentials", "username_office");
            password  = oXMLData.getData("settings/Credentials", "password");

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var pDFTemplate_ImportWizardHelper     = new PDFTemplate_ImportWizardHelper(GetWebDriver());
            var pDFTemplate_PDFTemplateHelper      = new PDFTemplate_PDFTemplateHelper(GetWebDriver());
            var corpPDFTemplate_ImportWizardHelper = new CorpPDFTemplate_ImportWizardHelper(GetWebDriver());
            var corpPDFTemplate_CategoriesHelper   = new CorpPDFTemplate_CategoriesHelper(GetWebDriver());

            // Variable random
            var Category        = "Category" + RandomNumber(1, 99999);
            var name            = "TestMerchant" + GetRandomNumber();
            var FilePth         = GetPathToFile() + "real.pdf";
            var InvalidFilePath = GetPathToFile() + "clientsamples(2).csv";

            String JIRA   = "";
            String Status = "Pass";

            try
            {
                executionLog.Log("PDFImpotWizard", "Login with valid username and password");
                Login(username[0], password[0]);

                executionLog.Log("PDFImpotWizard", "Verify Page title");
                VerifyTitle("Dashboard");

                executionLog.Log("PDFImpotWizard", "Redirect at pdf categories pge.");
                VisitCorp("pdf_templates/categories");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Click Create PDF Template");
                corpPDFTemplate_CategoriesHelper.ClickElement("Create");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Enter PDF NAME");
                corpPDFTemplate_CategoriesHelper.TypeText("EnterName", Category);

                executionLog.Log("PDFImpotWizard", "Click on Save");
                corpPDFTemplate_CategoriesHelper.ClickElement("Save");

                executionLog.Log("PDFImpotWizard", "Wait for Confirmation");
                corpPDFTemplate_CategoriesHelper.WaitForText("Category Created Successfully", 10);

                executionLog.Log("PDFImpotWizard", "Visit pdf Template import page");
                VisitCorp("pdf_templates/import");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Select Module.");
                corpPDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients");

                executionLog.Log("PDFImpotWizard", "Uplaod File");
                corpPDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", FilePth);
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Click on Import");
                corpPDFTemplate_ImportWizardHelper.ClickElement("Import");

                executionLog.Log("PDFImpotWizard", "Wait for next button to appear.");
                corpPDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextbtn", 10);

                executionLog.Log("PDFImpotWizard", "Click on Next");
                corpPDFTemplate_ImportWizardHelper.ClickDisplayed("//button[@title='Next']");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Wait for Confirmation");
                corpPDFTemplate_ImportWizardHelper.WaitForText("PDF fields mapped successfully.", 05);

                executionLog.Log("PDFImpotWizard", "Wait for next button to appear.");
                corpPDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextBtn2", 10);

                executionLog.Log("PDFImpotWizard", "Click on Next button again");
                corpPDFTemplate_ImportWizardHelper.ClickElement("ClickNextBtn2");

                executionLog.Log("PDFImpotWizard", "Verify confirmation");
                corpPDFTemplate_ImportWizardHelper.WaitForText("Signature Options saved successfully.", 10);

                executionLog.Log("PDFImpotWizard", "Select Category");
                corpPDFTemplate_ImportWizardHelper.SelectByText("SelectCatory", "Card Service Agreements");

                executionLog.Log("PDFImpotWizard", "Click on Save");
                corpPDFTemplate_ImportWizardHelper.ClickElement("Save");

                executionLog.Log("PDFImpotWizard", "Verif Confirmation");
                corpPDFTemplate_ImportWizardHelper.WaitForText("PDF Template options saved successfully.", 10);

                executionLog.Log("PDFImpotWizard", "Visit pdf Template import page");
                VisitCorp("pdf_templates/import");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Click Import");
                corpPDFTemplate_ImportWizardHelper.ClickElement("Import");
                //corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Wait for validation text.");
                corpPDFTemplate_ImportWizardHelper.WaitForText("This field is required.", 10);

                executionLog.Log("PDFImpotWizard", "Click on cancel.");
                corpPDFTemplate_ImportWizardHelper.ClickDisplayed("//a[@title='Cancel']");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Verify text on page.");
                corpPDFTemplate_ImportWizardHelper.VerifyText("VerifyTextPDFTemplatesHeader", "PDF Templates");

                executionLog.Log("PDFImpotWizard", "Visit pdf Template import page");
                VisitCorp("pdf_templates/import");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Select Module");
                corpPDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients");

                executionLog.Log("PDFImpotWizard", "Uplaod File");
                corpPDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", InvalidFilePath);
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Click Import");
                corpPDFTemplate_ImportWizardHelper.ClickElement("Import");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Accept alert message.");
                corpPDFTemplate_ImportWizardHelper.AcceptAlert();

                executionLog.Log("PDFImpotWizard", "Logout from the application.");
                VisitCorp("logout");

                executionLog.Log("PDFImpotWizard", "Login to the office module.");
                Login(username1[0], password[0]);
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(2000);

                executionLog.Log("PDFImpotWizard", "Goto PDF Categories");
                VisitOffice("pdf_templates/categories");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(4000);

                executionLog.Log("PDFImpotWizard", "Click Create PDF Template");
                pDFTemplate_PDFTemplateHelper.ClickElement("ClickCreatePDFImp");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Enter PDF Category Name");
                pDFTemplate_PDFTemplateHelper.TypeText("EnterPDFCategoryName", Category);

                executionLog.Log("PDFImpotWizard", "Click on Save");
                pDFTemplate_PDFTemplateHelper.ClickElement("PDFImportSave");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Goto pdf template import");
                VisitOffice("pdf_templates/import");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Select Module");
                pDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Upload file.");
                pDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", FilePth);
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Click Import PDF");
                pDFTemplate_ImportWizardHelper.ClickElement("Import");

                executionLog.Log("PDFImpotWizard", "Wait for next button to appear.");
                pDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextbtn", 10);

                executionLog.Log("PDFImpotWizard", "Click Next button");
                pDFTemplate_ImportWizardHelper.ClickElement("Next");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Verify Confirmation");
                pDFTemplate_ImportWizardHelper.WaitForText("PDF fields mapped successfully.", 10);

                executionLog.Log("PDFImpotWizard", "Wait for next button to appear.");
                pDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextBtn2", 10);

                executionLog.Log("PDFImpotWizard", "Click Next button");
                pDFTemplate_ImportWizardHelper.ClickElement("ClickNextBtn2");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Select Category.");
                pDFTemplate_ImportWizardHelper.SelectByText("Category", "Card Service Agreements");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Click on Save");
                pDFTemplate_ImportWizardHelper.ClickElement("Save");

                executionLog.Log("PDFImpotWizard", "Wait for Confirmation");
                pDFTemplate_ImportWizardHelper.WaitForText("PDF Template options saved successfully.", 10);
            }

            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("PDFImpotWizard");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("PDF Impot Wizard");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("PDF Impot Wizard", "Bug", "Medium", "PDF page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("PDF Impot Wizard");
                        TakeScreenshot("PDFImpotWizard");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\PDFImpotWizard.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("PDFImpotWizard");
                        string id            = loginHelper.getIssueID("PDF Impot Wizard");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\PDFImpotWizard.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("PDF Impot Wizard"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("PDF Impot Wizard");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("PDFImpotWizard");
                executionLog.WriteInExcel("PDF Impot Wizard", Status, JIRA, "PDF Import");
            }
        }