public void createPricingPlanAdmin()
        {
            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 masterData_PricingPlanHelper = new MasterData_PricingPlanHelper(GetWebDriver());

            // Variable
            var    name   = "Price" + RandomNumber(1, 9999);
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("CreatePricingPlanAdmin", "Click On  Admin");
                VisitOffice("admin");

                executionLog.Log("CreatePricingPlanAdmin", "Redirect To Pricing Plan");
                VisitOffice("pricing_plans");

                executionLog.Log("CreatePricingPlanAdmin", "Verify title");
                VerifyTitle("Master Pricing Plans");

                executionLog.Log("CreatePricingPlanAdmin", " Click On Create");
                masterData_PricingPlanHelper.ClickElement("Create");

                executionLog.Log("CreatePricingPlanAdmin", "Verify title");
                VerifyTitle("Manage Master Pricing Plans");

                executionLog.Log("CreatePricingPlanAdmin", "Enter Pricing Plan");
                masterData_PricingPlanHelper.TypeText("PricingPlan", name);

                executionLog.Log("CreatePricingPlanAdmin", " Select Processor Name");
                masterData_PricingPlanHelper.Selectbytext("Processor", "First Data Omaha");

                executionLog.Log("CreatePricingPlanAdmin", "  Click on Save button");
                masterData_PricingPlanHelper.ClickElement("Save");

                executionLog.Log("CreatePricingPlanAdmin", "Wait for Confirmation");
                masterData_PricingPlanHelper.WaitForText("The pricing plan is successfully created!!", 20);

                executionLog.Log("CreatePricingPlanAdmin", "Redirect To Pricing Plan");
                VisitOffice("pricing_plans");

                executionLog.Log("CreatePricingPlanAdmin", "Enter Name to search");
                masterData_PricingPlanHelper.TypeText("SearchPricingPlan", name);
                masterData_PricingPlanHelper.WaitForWorkAround(4000);

                executionLog.Log("CreatePricingPlanAdmin", "Click Delete btn  ");
                masterData_PricingPlanHelper.ClickElement("DeleteIcon");

                executionLog.Log("CreatePricingPlanAdmin", "Accept alert message. ");
                masterData_PricingPlanHelper.AcceptAlert();

                executionLog.Log("CreatePricingPlanAdmin", "Wait for delete message. ");
                masterData_PricingPlanHelper.WaitForText("The pricing plan is successfully deleted!!", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("CreatePricingPlanAdmin");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Create Pricing Plan Admin");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Create Pricing Plan Admin", "Bug", "Medium", "Pricing Plan page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Create Pricing Plan Admin");
                        TakeScreenshot("CreatePricingPlanAdmin");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CreatePricingPlanAdmin.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("CreatePricingPlanAdmin");
                        string id            = loginHelper.getIssueID("Create Pricing Plan Admin");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CreatePricingPlanAdmin.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Create Pricing Plan Admin"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Create Pricing Plan Admin");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("CreatePricingPlanAdmin");
                executionLog.WriteInExcel("Create Pricing Plan Admin", Status, JIRA, "Office Master Data");
            }
        }
        public void adminMasterDataPricingPlanURLChange()
        {
            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 masterData_PricingPlanHelper = new MasterData_PricingPlanHelper(GetWebDriver());


            // Variable
            var    FirstName = "Test" + GetRandomNumber();
            var    LastName  = "Tester" + GetRandomNumber();
            var    Number    = "12345678" + GetRandomNumber();
            String JIRA      = "";
            String Status    = "Pass";

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

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

                executionLog.Log("AdminMasterDataPricingPlanURLChange", "Goto Master Data >> pricicng Plan");
                VisitOffice("pricing_plans");

                executionLog.Log("AdminMasterDataPricingPlanURLChange", "Click On any Pricing Plan");
                masterData_PricingPlanHelper.ClickElement("OpenPricingPlan");
                masterData_PricingPlanHelper.WaitForWorkAround(2000);

                executionLog.Log("AdminMasterDataPricingPlanURLChange", "Change the url with the url number of another office");
                VisitOffice("manage_pricing_plans/1642");
                masterData_PricingPlanHelper.WaitForWorkAround(1000);

                executionLog.Log("AdminMasterDataPricingPlanURLChange", "Verify Validation");
                masterData_PricingPlanHelper.WaitForText("The pricing plan is does not exists.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("AdminMasterDataPricingPlanURLChange");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("AdminMaster Data Pricing Plan URL Change");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("AdminMaster Data Pricing Plan URL Change", "Bug", "Medium", "Pricing Plan", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("AdminMaster Data Pricing Plan URL Change");
                        TakeScreenshot("AdminMasterDataPricingPlanURLChange");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdminMasterDataPricingPlanURLChange.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("AdminMasterDataPricingPlanURLChange");
                        string id            = loginHelper.getIssueID("AdminMaster Data Pricing Plan URL Change");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdminMasterDataPricingPlanURLChange.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("AdminMaster Data Pricing Plan URL Change"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("AdminMaster Data Pricing Plan URL Change");
                //     executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("AdminMasterDataPricingPlanURLChange");
                executionLog.WriteInExcel("AdminMaster Data Pricing Plan URL Change", Status, JIRA, "Master Data");
            }
        }
        public void editPricingPlanIssue()
        {
            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    masterData_PricingPlanHelper = new MasterData_PricingPlanHelper(GetWebDriver());
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("EditPricingPlanIssue", "Go to Pricing Plan page");
                VisitOffice("pricing_plans");
                masterData_PricingPlanHelper.WaitForWorkAround(2000);

                executionLog.Log("EditPricingPlanIssue", "Verify title");
                VerifyTitle("Master Pricing Plans");
                masterData_PricingPlanHelper.WaitForWorkAround(2000);


                executionLog.Log("EditPricingPlanIssue", "Open a Plan");
                masterData_PricingPlanHelper.ClickElement("Plan");
                masterData_PricingPlanHelper.WaitForWorkAround(2000);


                executionLog.Log("EditPricingPlanIssue", "Verify title");
                VerifyTitle("Manage Master Pricing Plans");
                masterData_PricingPlanHelper.WaitForWorkAround(2000);


                executionLog.Log("EditPricingPlanIssue", "Click on 'Save'button");
                masterData_PricingPlanHelper.ClickElement("Save");
                masterData_PricingPlanHelper.WaitForWorkAround(2000);

                executionLog.Log("EditPricingPlanIssue", "Verify no validation message displayed");
                masterData_PricingPlanHelper.VerifyTextNotPresent("The pricing plan is already exists");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var corpMasterdata_PricingPlanHelper = new CorpMasterdata_PricingPlanHelper(GetWebDriver());
            var masterData_PricingPlanHelper     = new MasterData_PricingPlanHelper(GetWebDriver());

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

            // Variable random
            var name = "Test" + GetRandomNumber();
            var Test = "New" + GetRandomNumber();

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

            try
            {
                executionLog.Log("PricingPlanPushToOffice", "Login with valid credential  Username");
                Login(username[0], password[0]);

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

                executionLog.Log("PricingPlanPushToOffice", "Procing plan page");
                VisitCorp("masterdata/pricing_plans");
                corpMasterdata_PricingPlanHelper.WaitForWorkAround(3000);

                executionLog.Log("PricingPlanPushToOffice", "Verify Page title");
                VerifyTitle("Master Pricing Plans");

                executionLog.Log("PricingPlanPushToOffice", "Click On Create");
                corpMasterdata_PricingPlanHelper.ClickElement("Create");
                corpMasterdata_PricingPlanHelper.WaitForWorkAround(3000);

                executionLog.Log("PricingPlanPushToOffice", "Verify Page title");
                VerifyTitle("Manage Master Pricing Plans");

                executionLog.Log("PricingPlanPushToOffice", "Enter Pricing plan name");
                corpMasterdata_PricingPlanHelper.TypeText("PricingPlan", name);

                executionLog.Log("PricingPlanPushToOffice", "Enter Processor Code");
                corpMasterdata_PricingPlanHelper.SelectByText("SelectProcessor", "First Data Omaha");

                executionLog.Log("PricingPlanPushToOffice", "Click On Save Btn");
                corpMasterdata_PricingPlanHelper.ClickElement("Save");
                corpMasterdata_PricingPlanHelper.WaitForWorkAround(1000);

                executionLog.Log("PricingPlanPushToOffice", "Wait for success message.");
                corpMasterdata_PricingPlanHelper.WaitForText("The pricing plan is successfully created!!", 10);
                corpMasterdata_PricingPlanHelper.WaitForWorkAround(2000);

                executionLog.Log("PricingPlanPushToOffice", "Click On Push Office");
                corpMasterdata_PricingPlanHelper.ClickElement("PushOffice");
                corpMasterdata_PricingPlanHelper.AcceptAlert();

                executionLog.Log("PricingPlanPushToOffice", "Wait for success message");
                corpMasterdata_PricingPlanHelper.WaitForText("Pricing Plans successfully pushed to offices.", 15);

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

                executionLog.Log("PricingPlanPushToOffice", "Login to application using office credentails");
                Login(username1[0], password[0]);

                executionLog.Log("PricingPlanPushToOffice", "Login to application using office credentails");
                VerifyTitle("Dashboard");

                executionLog.Log("PricingPlanPushToOffice", "Redirect to Pricing");
                VisitOffice("pricing_plans");
                corpMasterdata_PricingPlanHelper.WaitForWorkAround(3000);

                executionLog.Log("PricingPlanPushToOffice", "Verify Page title");
                VerifyTitle("Master Pricing Plans");

                executionLog.Log("PricingPlanPushToOffice", "Search pricing plan by name");
                masterData_PricingPlanHelper.TypeText("SearchPricingPlan", name);
                corpMasterdata_PricingPlanHelper.WaitForWorkAround(2000);

                executionLog.Log("PricingPlanPushToOffice", "Verify Pricing Plan");
                corpMasterdata_PricingPlanHelper.VerifyPageText(name);
                //corpMasterdata_PricingPlanHelper.WaitForWorkAround(3000);

                executionLog.Log("AmexRatesPushToOffice", "Logout button");
                VisitOffice("logout");

                executionLog.Log("AmexRatesPushToOffice", "Login with valid credential");
                Login(username[0], password[0]);
                //corpMasterdata_PricingPlanHelper.WaitForWorkAround(3000);

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

                executionLog.Log("PricingPlanPushToOffice", "Procing plan page");
                VisitCorp("masterdata/pricing_plans");
                corpMasterdata_PricingPlanHelper.WaitForWorkAround(3000);

                executionLog.Log("CreatePricingPlan", "Enter Name to search");
                corpMasterdata_PricingPlanHelper.TypeText("SearchPricingPlan", name);
                corpMasterdata_PricingPlanHelper.WaitForWorkAround(2000);

                executionLog.Log("CreatePricingPlan", "Click Delete btn  ");
                corpMasterdata_PricingPlanHelper.ClickElement("DeletePricing");

                executionLog.Log("CreatePricingPlan", "Accept alert message. ");
                corpMasterdata_PricingPlanHelper.AcceptAlert();

                executionLog.Log("CreatePricingPlan", "Wait for delete message. ");
                corpMasterdata_PricingPlanHelper.WaitForText("The pricing plan is successfully deleted!!", 10);
            }


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

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