public void fieldDictionarySection()
        {
            string[] username = null;
            string[] password = null;
            string[] log = null;
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver());

            //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.");

            //Go to Field Dictionary Section page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/sections");

            //Verify Title
            VerifyTitle("Section Management");

            //Click on Change tab button
            partnerAgentHelperNewSkin.ClickElement("FSChangeTab");

            //Verify error not displayed
            partnerAgentHelperNewSkin.VerifyTextNotPresent("An Internal Error Has Occurred");

            //Click on Save button
            partnerAgentHelperNewSkin.ClickElement("FSSave");

            //Accept alert
            partnerAgentHelperNewSkin.AcceptAlert();

            //Verify error not displayed
            partnerAgentHelperNewSkin.VerifyTextNotPresent("An Internal Error Has Occurred");

            //Verify page text
            partnerAgentHelperNewSkin.VerifyPageText("The section sucessfully added to the selected tab");

            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
        public void loginError2()
        {
            string[] username = null;
            string[] password = null;
            string[] log = null;
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver());

            //Verify title
            VerifyTitle("Login");

            //Click on Verify my account
            partnerAgentHelperNewSkin.ClickElement("VerifyAccount");

            //Enter username
            partnerAgentHelperNewSkin.TypeText("VerifyUsername", "aa");

            //Click on V
            partnerAgentHelperNewSkin.ClickElement("VerifyBody");

            //Click on Send email button
            partnerAgentHelperNewSkin.ClickMultiple("VerifySend");

            //Accept Alert
            partnerAgentHelperNewSkin.AcceptAlert();

            //Enter username
            partnerAgentHelperNewSkin.TypeText("VerifyUsername", "aslamKhan");
        }
        public void fieldDisError()
        {
            string[] username = null;
            string[] password = null;
            string[] log = null;
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver());

            //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.");

            //Go to Create template page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/field_grouping_templates");

            //Verify title
            VerifyTitle("Field Grouping Templates");

            //Click on 'Create' button
            partnerAgentHelperNewSkin.ClickElement("TemplateCreate");

            //Enter TemplateName
            partnerAgentHelperNewSkin.TypeText("TemplateName", "DemoTemplate");

            //Select Module
            partnerAgentHelperNewSkin.SelectByText("TemplaceModule", "Clients");

            partnerAgentHelperNewSkin.WaitForWorkAround(2000);

            //Select Tab
            partnerAgentHelperNewSkin.SelectByText("TemplateTab", "Company Details");

            partnerAgentHelperNewSkin.WaitForWorkAround(5000);
            //Select Field
            partnerAgentHelperNewSkin.SelectByText("TemplateField", "Company Legal Name");

            //Click on Add Button
            partnerAgentHelperNewSkin.ClickElement("TemplateAdd");

            //Click on Save button
            partnerAgentHelperNewSkin.ClickElement("OfficeSave");

            //Click on Delete icon
            partnerAgentHelperNewSkin.ClickElement("TemplateDelete");

            //Accept alert
            partnerAgentHelperNewSkin.AcceptAlert();

            //Verify error not displayed
            partnerAgentHelperNewSkin.VerifyTextNotPresent("An Internal Error Has Occurred");

            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
        public void clientPDFInactive()
        {
            string[] username = null;
            string[] password = null;
            string[] log = null;
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver());

            //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.");

            //Visit to PDF template page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/pdf_templates");

            //Verify title
            VerifyTitle("PDF Templates");

            string VerifyInactive = "//table[@id='list1']/tbody/tr[2]/td/a/i[contains(@class,'thumbs-o-up')]";
            string text = "//table[@id='list1']/tbody/tr[2]/td/a[contains(@href,'view')]";

            partnerAgentHelperNewSkin.WaitForText("PDF Template is successfully",20);
            string PdfName = partnerAgentHelperNewSkin.GetText(text);
            if (!partnerAgentHelperNewSkin.IsElementPresent(VerifyInactive))
            {
                partnerAgentHelperNewSkin.ClickElement("ActivatePDF");
                partnerAgentHelperNewSkin.AcceptAlert();
                partnerAgentHelperNewSkin.WaitForWorkAround(5000);

            }

            //Go to client page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients");

            //verify title
               VerifyTitle("Clients");

            //Open client
            partnerAgentHelperNewSkin.ClickElement("ViewClient");

            //verify title
            VerifyTitle(" - Details");

               //click on pdf tab
            partnerAgentHelperNewSkin.ClickElement("ClPdf");

            //verify title
            VerifyTitle(" - Pdfs");

            //verify pdf not available
            partnerAgentHelperNewSkin.VerifyTextNotPresent(PdfName+".pdf");

            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
        public void deleteIndividualRevenue()
        {
            string[] username = null;
            string[] password = null;
            string[] log = null;
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver());

            //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.");

            //Go to Client page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients");

            //Verify title
            VerifyTitle("Clients");

            //Open on a clint
            partnerAgentHelperNewSkin.ClickElement("Client");

            //Verify title
            VerifyTitle("Company - Details");

            //Click on residual income
            partnerAgentHelperNewSkin.ClickElement("ClientIncome");

            //Verify title
            VerifyTitle(" - Residual Income");

            //Click on Set parnter revenue
            partnerAgentHelperNewSkin.doubleClick("PartnerShare");

            //Enter details
            partnerAgentHelperNewSkin.TypeText("ParnterShareInput", "1000");

            //Click on Save button
            partnerAgentHelperNewSkin.ClickElement("PartnerShareSave");

            //Verify title
            VerifyTitle(" - Residual Income");

            //Click on delete button
            partnerAgentHelperNewSkin.ClickElement("PartnerShareDelete");

            //Accept alert
            partnerAgentHelperNewSkin.AcceptAlert();

            //Verify deleted successfully
            partnerAgentHelperNewSkin.WaitForTextHide("1000",20);

            //Verify title
            VerifyTitle(" - Residual Income");

            //Click on Set parnter revenue
            partnerAgentHelperNewSkin.doubleClick("PartnerAgent");

            //Enter details
            partnerAgentHelperNewSkin.TypeText("PartnerAgentInput", "1000");

            //Click on Save button
            partnerAgentHelperNewSkin.ClickElement("PartternAgentSave");

            //Verify title
            VerifyTitle(" - Residual Income");

            //Click on delete button
            partnerAgentHelperNewSkin.ClickElement("PartnerShareDelete");

            //Accept alert
            partnerAgentHelperNewSkin.AcceptAlert();

            //Verify deleted successfully
            partnerAgentHelperNewSkin.WaitForTextHide("1000", 20);

            //Logout from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }