public void pDFImportWizard()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            PDFImportWizardHelper pDFImportWizardHelper = new PDFImportWizardHelper(GetWebDriver());

            // Variable
            String name = "Test" + RandomNumber(1,99);

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

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Click On  Admin
            pDFImportWizardHelper.RedirectToAdmin();

            //Redirect
            pDFImportWizardHelper.RedirectToPage();

            //Verify title
            VerifyTitle("PDF Import Wizard");

            //Click on Import  button
            pDFImportWizardHelper.ClickElement("ClickOnImport");

            //Choose Module
            pDFImportWizardHelper.Select("ChooseModule", "20");

            //Upload PDF File\
            String filename = GetPathToFile()+"2.pdf";
            pDFImportWizardHelper.upload("SelectFile", filename);

            //Click On Import
            pDFImportWizardHelper.ClickElement("ClickOnImport");

            pDFImportWizardHelper.WaitForWorkAround(10000);
            VerifyTitle("PDF Import Wizard");

            //Click On Next
            pDFImportWizardHelper.ClickElement("ClickOnNext");
            pDFImportWizardHelper.WaitForWorkAround(1000);
        }
        public void editPDFImportWizard()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            PDFImportWizardHelper pDFImportWizardHelper = new PDFImportWizardHelper(GetWebDriver());

            // Variable
            String pdf = "sample" + RandomNumber(1,99) +".pdf";

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

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Click On  Admin
            pDFImportWizardHelper.RedirectToAdmin();

            //Redirect
            pDFImportWizardHelper.RedirectToPage();

            //Verify title
            VerifyTitle("PDF Import Wizard");

            //Click on Import  button
            pDFImportWizardHelper.ClickElement("ClickOnImport");

            //Choose Module
            pDFImportWizardHelper.Select("ChooseModule", "20");

            //Upload PDF File\
            String filename = GetPathToFile()+"2.PDF";
            pDFImportWizardHelper.upload("SelectFile", filename);

            //Click On Import
            pDFImportWizardHelper.ClickElement("ClickOnImport");
            pDFImportWizardHelper.WaitForWorkAround(10000);

            //Click On Next
            pDFImportWizardHelper.ClickElement("ClickOnNext");

            //verify title
            VerifyTitle("PDF Import Wizard");

            //Select Category
            pDFImportWizardHelper.Select("SelectCategory", "338");

            //Click on Save button
            pDFImportWizardHelper.ClickElement("ClickOnSaveBtn");

            //wait for text
            pDFImportWizardHelper.WaitForText("PDF Template options saved successfully.", 30);

            //Click On Edit
            pDFImportWizardHelper.ClickElement("ClickOnEdit");

            //Verify title
            VerifyTitle("Edit PDF Template");

            //Enter Name
            pDFImportWizardHelper.TypeText("EnterName","Test.pdf");

            //Click Edit Save
            pDFImportWizardHelper.ClickElement("ClickEditSave");

            pDFImportWizardHelper.WaitForText("PDF Template Updated Successfully.", 30);

            //Click on Flag To make Inactive
            pDFImportWizardHelper.ClickElement("ClickOnMakeInactiveBtn");
            pDFImportWizardHelper.WaitForWorkAround(6000);
        }
        public void clonePDFTemplate()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            PDFImportWizardHelper pDFImportWizardHelper = new PDFImportWizardHelper(GetWebDriver());

            // Variable
            String name = "Test" + RandomNumber(1,99);

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

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Redirect to PDF Template
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/pdf_templates");
            pDFImportWizardHelper.WaitForWorkAround(6000);

            var Click = "//table[@id='list1']/tbody/tr[2]";
            if (pDFImportWizardHelper.IsElementPresent(Click))
            {
                Console.WriteLine(pDFImportWizardHelper.IsElementPresent(Click));

                pDFImportWizardHelper.ClickElement("ClickOnPDFToClone");
                pDFImportWizardHelper.ClickElement("ClickOnCloneBtn");
                pDFImportWizardHelper.AcceptAlert();
                pDFImportWizardHelper.WaitForWorkAround(2000);
                pDFImportWizardHelper.VerifyPageText("PDF Template is cloned successfully");
                pDFImportWizardHelper.WaitForWorkAround(2000);
                pDFImportWizardHelper.VerifyPageText("View - Clone of ID");
                pDFImportWizardHelper.WaitForWorkAround(2000);
            }

            else
            {

                //Click On PDF Package
                pDFImportWizardHelper.ClickElement("ClickOnPDFPackage");

                //Enter PDF Name
                pDFImportWizardHelper.TypeText("EnterPDFName", "New PDF");

                //Select Module
                pDFImportWizardHelper.Select("SelectModule", "20");
                pDFImportWizardHelper.WaitForWorkAround(2000);

                //Select Module
                pDFImportWizardHelper.Select("SelectPDFTemplate", "6031");

                //SelectCatory
                pDFImportWizardHelper.Select("SelectCatory", "290");

                //Click Checkbox
                pDFImportWizardHelper.ClickElement("DisplayeInTabs");

                //Click on  Can Share
                pDFImportWizardHelper.ClickElement("CanShare");

                //CanEmail
                pDFImportWizardHelper.ClickElement("CanEmail");

                //Click on Save button
                pDFImportWizardHelper.ClickElement("ClickOnSave");
                pDFImportWizardHelper.VerifyPageText("PDF Package Template Created Successfully.");
                pDFImportWizardHelper.WaitForWorkAround(4000);

               //###################  CLone
                pDFImportWizardHelper.ClickElement("ClickOnPDFTemplates");

                //Redirect to PDF Template
                GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/pdf_templates");

                //Enter Name To search
                pDFImportWizardHelper.TypeText("EnterPDFNameToSrch", "New PDF");
                pDFImportWizardHelper.ClickElement("ClickOnPDFToClone");
                pDFImportWizardHelper.WaitForWorkAround(2000);
                pDFImportWizardHelper.ClickElement("ClickOnCloneBtn");
                pDFImportWizardHelper.WaitForWorkAround(2000);
                pDFImportWizardHelper.AcceptAlert();
                pDFImportWizardHelper.WaitForWorkAround(2000);
                pDFImportWizardHelper.VerifyPageText("PDF Template is cloned successfully");
                pDFImportWizardHelper.WaitForWorkAround(2000);
                pDFImportWizardHelper.VerifyPageText("View - Clone of ID");
                pDFImportWizardHelper.WaitForWorkAround(2000);

            }
        }
        public void pDFImportWizardMaping()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            PDFImportWizardHelper pDFImportWizardHelper = new PDFImportWizardHelper(GetWebDriver());

            // Variable
            String name = "Test" + RandomNumber(1,99);

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

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Click on Clients in Topmenu
            //            clientHelper.clickClients();

            //Click to open client info
               //         clientHelper.OpenClient();

            //#######################  MOVE HOVER TO THE WELCOME
            //Click on Move over
            pDFImportWizardHelper.ClickElement("MoveHover");

            //Click On  Admin
            pDFImportWizardHelper.RedirectToAdmin();

            //################################# PDF TEMPLATE TAB #############################################

            //Click on Terminal And Equipment Tab
            pDFImportWizardHelper.ClickElement("ClickOnPDFTemplates");

            //Redirect
            pDFImportWizardHelper.RedirectToPage();

            //Click on Import  button
            pDFImportWizardHelper.ClickElement("ClickOnImport");

            //Accept Alrt
            pDFImportWizardHelper.AcceptAlert();

            //Click on Click Here Link
            pDFImportWizardHelper.ClickElement("ClickOnClickHereLink");

            //Click On Close Icon
            pDFImportWizardHelper.ClickElement("ClickOnCloseIcon");

            //Choose Module
            pDFImportWizardHelper.Select("ChooseModule", "20");

            //Upload PDF File\
            String filename = "D:\\pegqa\\TestAutomationProject\\PegasusTests\\Files\\2.pdf";
            pDFImportWizardHelper.upload("SelectFile", filename);

            //Click On Import
            pDFImportWizardHelper.ClickElement("ClickOnImport");
            //pDFImportWizardHelper.AcceptAlert();
            pDFImportWizardHelper.WaitForWorkAround(3000);

            //Click on Client Type
            pDFImportWizardHelper.ClickElement("ClickOnClientRadioBtn");

            //Click On Next
            pDFImportWizardHelper.ClickElement("ClickOnNext");
            pDFImportWizardHelper.WaitForWorkAround(1000);

            //Select Category
            pDFImportWizardHelper.Select("SelectCategory", "292");

            //Click on Save button
            pDFImportWizardHelper.ClickElement("ClickOnSaveBtn");
            pDFImportWizardHelper.WaitForWorkAround(4000);
        }
        public void createPDFTemplate()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            PDFImportWizardHelper pDFImportWizardHelper = new PDFImportWizardHelper(GetWebDriver());

            // Variable
            String name = "Test" + RandomNumber(1,99);

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

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //#######################  MOVE HOVER TO THE WELCOME
            //Click on Move over
            pDFImportWizardHelper.ClickElement("MoveHover");

            //Click On  Admin
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/admin");

            //################################# PDF TEMPLATE TAB #############################################

            //Click on Terminal And Equipment Tab
            pDFImportWizardHelper.ClickElement("ClickOnPDFTemplates");

            //Redirect to PDF Template
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/pdf_templates");

            //Click On PDF Package
            pDFImportWizardHelper.ClickElement("ClickOnPDFPackage");

            //Enter PDF Name
            pDFImportWizardHelper.TypeText("EnterPDFName", "New PDF");

            //Select Module
            pDFImportWizardHelper.Select("SelectModule", "20");
            pDFImportWizardHelper.WaitForWorkAround(3000);

            //Select Module
            pDFImportWizardHelper.Select("SelectPDFTemplate", "6031");

            //SelectCatory
            pDFImportWizardHelper.Select("SelectCatory", "290");

            //Click Checkbox
            pDFImportWizardHelper.ClickElement("DisplayeInTabs");

            //Click on  Can Share
            pDFImportWizardHelper.ClickElement("CanShare");

            //CanEmail
            pDFImportWizardHelper.ClickElement("CanEmail");

            //Click on Save button
            pDFImportWizardHelper.ClickElement("ClickOnSave");
            pDFImportWizardHelper.VerifyPageText("PDF Package Template Created Successfully.");
            pDFImportWizardHelper.WaitForWorkAround(4000);
        }