public void removeResidualAdjustmentOffice()
        {
            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 ResidualIncome_MasterDataHelper = new ResidualIncome_MasterDataHelper(GetWebDriver());

            // Random Variables
            String JIRA   = "";
            String Status = "Pass";

            //      try
            //    {

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

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

            executionLog.Log("RemoveResidualAdjustmentOffice", "Go to residual adjustments tools page.");
            VisitOffice("rir/adjustments_tool");

            executionLog.Log("RemoveResidualAdjustmentOffice", "Delete residual tools.");
            ResidualIncome_MasterDataHelper.WaitForWorkAround(6000);
            ResidualIncome_MasterDataHelper.CleanAdjustment();
        }
Exemplo n.º 2
0
        public void viewRevenueAdjustmentPartnerAgentAddFlatAmount()
        {
            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");
            String JIRA   = "";
            String Status = "Pass";

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var agents_PartnerAgentsHelper      = new Agents_PartnerAgentsHelper(GetWebDriver());
            var residualIncome_MasterDataHelper = new ResidualIncome_MasterDataHelper(GetWebDriver());

            // Variable random
            var name       = "PAgent" + RandomNumber(1, 999);
            var Email      = "Part" + RandomNumber(1, 999) + "@yopmail.com";
            var Adjustment = "Adjustment" + GetRandomNumber();


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

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

                executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Redirect at Partner Agent page.");
                VisitOffice("partners/agents");
                agents_PartnerAgentsHelper.WaitForWorkAround(5000);

                executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select status of agent..");
                agents_PartnerAgentsHelper.Select("SelectStatusAdjtmnt", "");

                executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Search the 'Partner Agent Tester");
                agents_PartnerAgentsHelper.TypeText("SearchAgent", "Partner Agent Tester");
                agents_PartnerAgentsHelper.WaitForWorkAround(5000);

                var loc = "//table[@id='list1']/tbody/tr[2]/td[@title='Partner Agent Tester']";
                agents_PartnerAgentsHelper.WaitForElementPresent(loc, 10);
                if (agents_PartnerAgentsHelper.IsElementPresent(loc))
                {
                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Click On Partner Agent");
                    agents_PartnerAgentsHelper.ClickElement("ClikOnPartnerAgent");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Click On Create btn Adjmnt");
                    agents_PartnerAgentsHelper.ClickElement("ClickOnCreatebtnAdjmnt");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter Adjustment Name");
                    agents_PartnerAgentsHelper.TypeText("EnterAdjustmentName", Adjustment);

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select Adjustment For");
                    agents_PartnerAgentsHelper.Select("SelectAdjustmentFor", "Agent");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "select type");
                    agents_PartnerAgentsHelper.Select("AdjustmentType", "Transaction");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "select period");
                    agents_PartnerAgentsHelper.Select("SelectReportingPeriod", "00");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select Processor");
                    agents_PartnerAgentsHelper.Select("SelectProcessor", "Any");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "select rule");
                    agents_PartnerAgentsHelper.Select("SelectRuleType", "1");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter Amount");
                    agents_PartnerAgentsHelper.TypeText("EnterAmount", "20");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select AddRemove");
                    agents_PartnerAgentsHelper.Select("AddRemove", "Add");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "ClickOnSaveBtnAdjustmnet");
                    agents_PartnerAgentsHelper.ClickElement("ClickOnSaveBtnAdjustmnet");
                    agents_PartnerAgentsHelper.WaitForWorkAround(3000);

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Verify message");
                    agents_PartnerAgentsHelper.WaitForText("Master Adjustment Rules Created Successfully.", 10);

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Redirect at adjustment tools page.");
                    VisitOffice("rir/adjustments_tool");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Verify page title.");
                    VerifyTitle("Adjustments Tool");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter adjustment to be deleted.");
                    residualIncome_MasterDataHelper.TypeText("EnterAdjustmentNameSrch", Adjustment);
                    residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Click on delete icon.");
                    residualIncome_MasterDataHelper.ClickElement("DeleteAdjtmnt");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Accept alert message.");
                    residualIncome_MasterDataHelper.AcceptAlert();

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Wait for delete success.");
                    residualIncome_MasterDataHelper.WaitForText("Ruleset deleted successfully.", 10);
                }
                else
                {
                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Click On Create");
                    agents_PartnerAgentsHelper.ClickElement("Create");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select Salutation");
                    agents_PartnerAgentsHelper.Select("SelectSalutation", "Mr");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter FirstNAME");
                    agents_PartnerAgentsHelper.TypeText("FirstName", "Partner Agent");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter LastName");
                    agents_PartnerAgentsHelper.TypeText("LastName", "Tester");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter Date Of Birth");
                    agents_PartnerAgentsHelper.TypeText("BirthDay", "12/16/1991");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter DBAName");
                    agents_PartnerAgentsHelper.TypeText("DBAName", "Test DBA");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter LinkedInUrl");
                    agents_PartnerAgentsHelper.TypeText("LinkedInUrl", "LinkedIn.con");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter FaceBook Url");
                    agents_PartnerAgentsHelper.TypeText("FaceBookUrl", "Facebook.com");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter TwitterURL");
                    agents_PartnerAgentsHelper.TypeText("TwitterURL", "Twitter.com");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select DBAName");
                    agents_PartnerAgentsHelper.Select("SelectLanguage", "English");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select eAddressType");
                    agents_PartnerAgentsHelper.Select("eAddressType", "E-Mail");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select eAddressLebel");
                    agents_PartnerAgentsHelper.Select("eAddressLebel", "Work");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter eAddressType");
                    agents_PartnerAgentsHelper.TypeText("eAddress", Email);

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter SelectPhoneType");
                    agents_PartnerAgentsHelper.Select("SelectPhoneType", "Work");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter PhoneNumber");
                    agents_PartnerAgentsHelper.TypeText("PhoneNumber", "1212121212");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter Address Type    ");
                    agents_PartnerAgentsHelper.Select("AddressType", "Office");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter AddressLine1");
                    agents_PartnerAgentsHelper.TypeText("AddressLine1", "FC 89");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter Postal Code");
                    agents_PartnerAgentsHelper.TypeText("PostalCode", "60601");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Click On Checkbox");
                    agents_PartnerAgentsHelper.ClickElement("ClickONcheckBox");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter UserName");
                    agents_PartnerAgentsHelper.TypeText("UserName", name);

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Click On Avatar");
                    agents_PartnerAgentsHelper.ClickElement("ClickOnAvatar");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "CLICK Save AGENT btn");
                    agents_PartnerAgentsHelper.ClickElement("SaveAgent");
                    agents_PartnerAgentsHelper.WaitForWorkAround(3000);

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Click On Create adjustment button");
                    agents_PartnerAgentsHelper.scrollToElement("ClickOnCreatebtnAdjmnt");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Click On Create btn Adjmnt");
                    agents_PartnerAgentsHelper.ClickElement("ClickOnCreatebtnAdjmnt");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter Adjustment Name");
                    agents_PartnerAgentsHelper.TypeText("EnterAdjustmentName", Adjustment);

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select Adjustment For");
                    agents_PartnerAgentsHelper.Select("SelectAdjustmentFor", "Agent");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "select type");
                    agents_PartnerAgentsHelper.Select("AdjustmentType", "Transaction");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "select period");
                    agents_PartnerAgentsHelper.Select("SelectReportingPeriod", "00");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select Processor");
                    agents_PartnerAgentsHelper.Select("SelectProcessor", "Any");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select Adjustment For");
                    agents_PartnerAgentsHelper.Select("SelectRuleType", "0");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter Amount");
                    agents_PartnerAgentsHelper.TypeText("EnterAmount", "200");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Select AddRemove");
                    agents_PartnerAgentsHelper.Select("AddRemove", "Add");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Click On Save Btn");
                    agents_PartnerAgentsHelper.ClickElement("SaveAdjustment");
                    agents_PartnerAgentsHelper.WaitForWorkAround(3000);

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Verify message");
                    agents_PartnerAgentsHelper.VerifyPageText("Master Adjustment Rules Created Successfully.");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Redirect at adjustment tools page.");
                    VisitOffice("rir/adjustments_tool");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Verify page title.");
                    VerifyTitle("Adjustments Tool");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Enter adjustment to be deleted.");
                    residualIncome_MasterDataHelper.TypeText("EnterAdjustmentNameSrch", Adjustment);
                    residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Click on delete icon.");
                    residualIncome_MasterDataHelper.ClickElement("DeleteAdjtmnt");

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Accept alert message.");
                    residualIncome_MasterDataHelper.AcceptAlert();

                    executionLog.Log("ViewRevenueAdjustmentPartnerAgentAddFlatAmount", "Wait for delete success.");
                    residualIncome_MasterDataHelper.WaitForText("Ruleset deleted successfully.", 10);
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ViewRevenueAdjustmentPartnerAgentAddFlatAmount");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("View Revenue Adjustment Partner Agent Add Flat Amount");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("View Revenue Adjustment Partner Agent Add Flat Amount", "Bug", "Medium", "Partner page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("View Revenue Adjustment Partner Agent Add Flat Amount");
                        TakeScreenshot("ViewRevenueAdjustmentPartnerAgentAddFlatAmount");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ViewRevenueAdjustmentPartnerAgentAddFlatAmount.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ViewRevenueAdjustmentPartnerAgentAddFlatAmount");
                        string id            = loginHelper.getIssueID("View Revenue Adjustment Partner Agent Add Flat Amount");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ViewRevenueAdjustmentPartnerAgentAddFlatAmount.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("View Revenue Adjustment Partner Agent Add Flat Amount"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("View Revenue Adjustment Partner Agent Add Flat Amount");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ViewRevenueAdjustmentPartnerAgentAddFlatAmount");
                executionLog.WriteInExcel("View Revenue Adjustment Partner Agent Add Flat Amount", Status, JIRA, "Agent Portal");
            }
        }
Exemplo n.º 3
0
        public void residualIncomeOfficeAdjustmentToolAgentsPercentage()
        {
            string[] username = null;
            string[] password = null;
            String   JIRA     = "";
            String   Status   = "Pass";

            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 residualIncome_MasterDataHelper = new ResidualIncome_MasterDataHelper(GetWebDriver());

            // Variable
            var name = "TestAgent" + GetRandomNumber();


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

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

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Redirect at adjustment tool page.");
                VisitOffice("rir/adjustments_tool");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Verify title");
                VerifyTitle("Adjustments Tool");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Click On Create btn Adjmnt");
                residualIncome_MasterDataHelper.ClickElement("ClickOnCreateAdjust");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Enter Adjustment Name");
                residualIncome_MasterDataHelper.TypeText("EnterAdjustmentName", name);

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Select Adjustment For");
                residualIncome_MasterDataHelper.Select("SelectAdjustmentFor", "Agent");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "type");
                residualIncome_MasterDataHelper.Select("AdjustmentType", "Transaction");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "period");
                residualIncome_MasterDataHelper.Select("SelectReportingPeriod", "00");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "SelectProcessor");
                residualIncome_MasterDataHelper.Select("SelectProcessor", "Any");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "rule");
                residualIncome_MasterDataHelper.Select("SelectRuleType", "1");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Enter Amount");
                residualIncome_MasterDataHelper.TypeText("EnterAmount", "20");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "AddRemove");
                residualIncome_MasterDataHelper.Select("AddRemove", "Remove");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Click On Save Button");
                residualIncome_MasterDataHelper.ClickElement("ClickOnSaveBtnAdjustmnet");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Verify message");
                residualIncome_MasterDataHelper.VerifyPageText("Master Adjustment Rules Created Successfully.");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Redirect at adjustment tool page.");
                VisitOffice("rir/adjustments_tool");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Verify title");
                VerifyTitle("Adjustments Tool");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Verify title");
                residualIncome_MasterDataHelper.TypeText("EnterAdjustmentNameSrch", name);
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Click on delete icon.");
                residualIncome_MasterDataHelper.ClickElement("DeleteAdjustment");

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Accept alert message.");
                residualIncome_MasterDataHelper.AcceptAlert();
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualIncomeOfficeAdjustmentToolAgentsPercentage", "Wait for text.");
                residualIncome_MasterDataHelper.WaitForText("Ruleset deleted successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ResidualIncomeOfficeAdjustmentToolAgentsPercentage");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Residual Income Office Adjustment Tool Agents Percentage");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Residual Income Office Adjustment Tool Agents Percentage", "Bug", "Medium", "Partner page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Residual Income Office Adjustment Tool Agents Percentage");
                        TakeScreenshot("ResidualIncomeOfficeAdjustmentToolAgentsPercentage");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ResidualIncomeOfficeAdjustmentToolAgentsPercentage.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ResidualIncomeOfficeAdjustmentToolAgentsPercentage");
                        string id            = loginHelper.getIssueID("Residual Income Office Adjustment Tool Agents Percentage");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ResidualIncomeOfficeAdjustmentToolAgentsPercentage.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Residual Income Office Adjustment Tool Agents Percentage"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Residual Income Office Adjustment Tool Agents Percentage");
                //     executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ResidualIncomeOfficeAdjustmentToolAgentsPercentage");
                executionLog.WriteInExcel("Residual Income Office Adjustment Tool Agents Percentage", Status, JIRA, "Residual Adjustment");
            }
        }
        public void adjustmentToolURLChange()
        {
            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 residualIncome_MasterData_AdjustmentToolHelper = new ResidualIncome_MasterDataHelper(GetWebDriver());


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

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

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

                executionLog.Log("AdjustmentToolURLChange", "Goto User Residual Income >> Master Data >>  Adjustment Tool");
                VisitOffice("rir/adjustments_tool");
                residualIncome_MasterData_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("AdjustmentToolURLChange", "Click On Adjustment Tool");
                residualIncome_MasterData_AdjustmentToolHelper.ClickElement("ClickOnAdjustmentFirst");
                residualIncome_MasterData_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("AdjustmentToolURLChange", "Change the url with the url number of another office");
                VisitOffice("rir/adjustments_tool/edit/418");
                residualIncome_MasterData_AdjustmentToolHelper.WaitForWorkAround(2000);

                executionLog.Log("AdjustmentToolURLChange", "Verify Validation");
                residualIncome_MasterData_AdjustmentToolHelper.WaitForText("oops something went wrong", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("AdjustmentToolURLChange");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Adjustment Tool URL Change");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Adjustment Tool URL Change", "Bug", "Medium", "Adjustment Tool page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Adjustment Tool URL Change");
                        TakeScreenshot("AdjustmentToolURLChange");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdjustmentToolURLChange.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("AdjustmentToolURLChange");
                        string id            = loginHelper.getIssueID("Adjustment Tool URL Change");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdjustmentToolURLChange.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Adjustment Tool URL Change"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Adjustment Tool URL Change");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("AdjustmentToolURLChange");
                executionLog.WriteInExcel("Adjustment Tool URL Change", Status, JIRA, "Residual Income");
            }
        }
Exemplo n.º 5
0
        public void residualAdjustment()
        {
            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 residualIncome_MasterDataHelper = new ResidualIncome_MasterDataHelper(GetWebDriver());

            // Variable random
            var    usernme = "Sysprins" + RandomNumber(44, 799999977);
            var    name    = "Test" + GetRandomNumber();
            String JIRA    = "";
            String Status  = "Pass";

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

                executionLog.Log("ResidualAdjustment", "Verify Page title");
                VerifyTitle("Dashboard");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Goto Residual Incomwe Adjustment tool create");
                VisitOffice("rir/adjustments_tool/create");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Enter Adjustment NAME");
                residualIncome_MasterDataHelper.TypeText("EnterAdjustmentName", name);

                executionLog.Log("ResidualAdjustment", "Select Adjustment for");
                residualIncome_MasterDataHelper.SelectByText("SelectAdjustmentFor", "Office");

                executionLog.Log("ResidualAdjustment", "Adjustment Type");
                residualIncome_MasterDataHelper.SelectByText("AdjustmentType", "Transaction");

                executionLog.Log("ResidualAdjustment", "Reporting Period");
                residualIncome_MasterDataHelper.SelectByText("SelectReportingPeriod", "Any");

                executionLog.Log("ResidualAdjustment", "Select Processor");
                residualIncome_MasterDataHelper.SelectByText("SelectProcessor", "First Data Omaha");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Click on save button.");
                residualIncome_MasterDataHelper.ClickElement("ClickOnSaveBtnAdjustmnet");

                executionLog.Log("ResidualAdjustment", "Wait for confirmation.");
                residualIncome_MasterDataHelper.WaitForText("Master Adjustment Rules Created Successfully.", 10);

                executionLog.Log("ResidualAdjustment", "Goto Residual Income Adjustment tool create");
                VisitOffice("rir/adjustments_tool/create");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Enter Adjustment NAME");
                residualIncome_MasterDataHelper.TypeText("EnterAdjustmentName", name);

                executionLog.Log("ResidualAdjustment", "Select Adjustment for");
                residualIncome_MasterDataHelper.SelectByText("SelectAdjustmentFor", "Office");

                executionLog.Log("ResidualAdjustment", "Adjustment Type");
                residualIncome_MasterDataHelper.SelectByText("AdjustmentType", "Transaction");

                executionLog.Log("ResidualAdjustment", "Reporting Period");
                residualIncome_MasterDataHelper.SelectByText("SelectReportingPeriod", "Any");

                executionLog.Log("ResidualAdjustment", "Select Processor");
                residualIncome_MasterDataHelper.SelectByText("SelectProcessor", "First Data Omaha");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Click on cancel button.");
                residualIncome_MasterDataHelper.ClickElement("CancelResidualAdjustment");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Verify page text.");
                residualIncome_MasterDataHelper.VerifyText("ClickOnAdjustmentToolRI", "Adjustments Tool");

                executionLog.Log("ResidualAdjustment", "Goto Residual Income Adjustment tool create");
                VisitOffice("rir/adjustments_tool/create");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Enter Adjustment NAME");
                residualIncome_MasterDataHelper.TypeText("EnterAdjustmentName", name);

                executionLog.Log("ResidualAdjustment", "Select Adjustment for");
                residualIncome_MasterDataHelper.SelectByText("SelectAdjustmentFor", "Office");

                executionLog.Log("ResidualAdjustment", "Adjustment Type");
                residualIncome_MasterDataHelper.SelectByText("AdjustmentType", "Transaction");

                executionLog.Log("ResidualAdjustment", "Reporting Period");
                residualIncome_MasterDataHelper.SelectByText("SelectReportingPeriod", "Any");

                executionLog.Log("ResidualAdjustment", "Select Processor");
                residualIncome_MasterDataHelper.SelectByText("SelectProcessor", "First Data Omaha");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Select RuleType");
                residualIncome_MasterDataHelper.SelectByText("SelectRuleType", "Percentage");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "EnterAmountRA");
                residualIncome_MasterDataHelper.TypeText("EnterAmount", "TEST AMOUNT");

                executionLog.Log("ResidualAdjustment", " Select Add / Remove");
                residualIncome_MasterDataHelper.Select("AddRemove", "Add");

                executionLog.Log("ResidualAdjustment", "Click on Save");
                residualIncome_MasterDataHelper.ClickElement("ClickOnSaveBtnAdjustmnet");

                executionLog.Log("ResidualAdjustment", "Wait for confirmation.");
                residualIncome_MasterDataHelper.WaitForText("Please enter a valid number.", 10);

                executionLog.Log("ResidualAdjustment", "EnterAmountRA");
                residualIncome_MasterDataHelper.TypeText("EnterAmount", "-22");

                executionLog.Log("ResidualAdjustment", "Click on Save");
                residualIncome_MasterDataHelper.ClickElement("ClickOnSaveBtnAdjustmnet");

                executionLog.Log("ResidualAdjustment", "Wait for validation message.");
                residualIncome_MasterDataHelper.WaitForText("Please enter a value greater than or equal to 0.", 10);

                executionLog.Log("ResidualAdjustment", "Enter Amount RA");
                residualIncome_MasterDataHelper.TypeText("EnterAmount", "500");

                executionLog.Log("ResidualAdjustment", "Click on Save");
                residualIncome_MasterDataHelper.ClickElement("ClickOnSaveBtnAdjustmnet");

                executionLog.Log("ResidualAdjustment", "Wait for validation.");
                residualIncome_MasterDataHelper.WaitForText("Please enter a value less than or equal to 100.", 10);

                executionLog.Log("ResidualAdjustment", "Select Rule Type");
                residualIncome_MasterDataHelper.SelectByText("SelectRuleType", "Flat Amount");
                residualIncome_MasterDataHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustment", "EnterAmountRA");
                residualIncome_MasterDataHelper.TypeText("EnterAmount", "44.2343");

                executionLog.Log("ResidualAdjustment", "Click on Save");
                residualIncome_MasterDataHelper.ClickElement("ClickOnSaveBtnAdjustmnet");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Redirect at adjustment tools page.");
                VisitOffice("rir/adjustments_tool");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Verify page title.");
                VerifyTitle("Adjustments Tool");

                executionLog.Log("ResidualAdjustment", "Enter adjustment to be deleted.");
                residualIncome_MasterDataHelper.TypeText("EnterAdjustmentNameSrch", name);
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Click on delete icon.");
                residualIncome_MasterDataHelper.ClickElement("DeleteAdjtmnt");

                executionLog.Log("ResidualAdjustment", "Accept alert message.");
                residualIncome_MasterDataHelper.AcceptAlert();

                executionLog.Log("ResidualAdjustment", "Wait for delete success.");
                residualIncome_MasterDataHelper.WaitForText("Ruleset deleted successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            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 agents_EmployeesHelper          = new Agents_EmployeesHelper(GetWebDriver());
            var residualIncome_MasterDataHelper = new ResidualIncome_MasterDataHelper(GetWebDriver());

            // VARIABLE
            var name       = "TestEmployee" + GetRandomNumber();
            var Adjustment = "Adjustment" + GetRandomNumber();


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

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

                executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Redirect to employee agents page.");
                VisitOffice("employees");
                agents_EmployeesHelper.WaitForWorkAround(3000);

                var loc = "//table[@id='list1']/tbody/tr[2]";
                agents_EmployeesHelper.WaitForElementPresent(loc, 10);
                if (agents_EmployeesHelper.IsElementPresent(loc))
                {
                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Sale Agent");
                    agents_EmployeesHelper.ClickElement("ClikOnEmployeeAgent");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Create btn Adjmnt");
                    agents_EmployeesHelper.ClickElement("ClickOnCreatebtnAdjmnt");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click on SaleAgent");
                    agents_EmployeesHelper.ClickElement("ClickSaleManager");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Wait for element to present.");
                    agents_EmployeesHelper.WaitForElementPresent("EnterAdjustmentName", 10);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "EnterAdjustmentName");
                    agents_EmployeesHelper.TypeText("EnterAdjustmentName", Adjustment);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectAdjustmentFor", "Agent");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("AdjustmentType", "Transaction");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectReportingPeriod", "00");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectProcessor");
                    agents_EmployeesHelper.Select("SelectProcessor", "Any");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectRuleType", "1");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter Amount");
                    agents_EmployeesHelper.TypeText("EnterAmount", "20");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "AddRemove");
                    agents_EmployeesHelper.Select("AddRemove", "Add");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Save Btn ");
                    agents_EmployeesHelper.ClickElement("ClickOnSaveBtnAdjustmnet");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Verify message");
                    agents_EmployeesHelper.WaitForText("Master Adjustment Rules Created Successfully.", 10);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Redirect at adjustment tools page.");
                    VisitOffice("rir/adjustments_tool");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Verify page title.");
                    VerifyTitle("Adjustments Tool");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter adjustment to be deleted.");
                    residualIncome_MasterDataHelper.TypeText("EnterAdjustmentNameSrch", Adjustment);
                    residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click on delete icon.");
                    residualIncome_MasterDataHelper.ClickElement("DeleteAdjtmnt");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Accept alert message.");
                    residualIncome_MasterDataHelper.AcceptAlert();

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Wait for delete success.");
                    residualIncome_MasterDataHelper.WaitForText("Ruleset deleted successfully.", 10);
                }
                else
                {
                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Create Employee Btn");
                    agents_EmployeesHelper.ClickElement("Create");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Select Salutation");
                    agents_EmployeesHelper.Select("SelectSalutation", "Mr");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter FirstNAME");
                    agents_EmployeesHelper.TypeText("FirstNAME", "Employee Agent");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter LastName");
                    agents_EmployeesHelper.TypeText("LastName", "Tester");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter Date Of Birth");
                    agents_EmployeesHelper.TypeText("BirthDay", "1991-03-02");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Select eAddressType");
                    agents_EmployeesHelper.Select("eAddressType", "E-Mail");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Select eAddressLebel");
                    agents_EmployeesHelper.Select("eAddressLebel", "Work");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter eAddressType");
                    agents_EmployeesHelper.TypeText("eAddress", "*****@*****.**");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Select SelectPhoneType");
                    agents_EmployeesHelper.Select("SelectPhoneType", "Work");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter PhoneNumber");
                    agents_EmployeesHelper.TypeText("PhoneNumber", "121212121");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Select Address Type");
                    agents_EmployeesHelper.Select("AddressType", "Office");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter AddressLine1");
                    agents_EmployeesHelper.TypeText("AddressLine1", "FC 89");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter Postal code");
                    agents_EmployeesHelper.TypeText("PostalCode", "60601");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click on save button.");
                    agents_EmployeesHelper.ClickElement("ClickSaveNskin");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Wait for success message");
                    agents_EmployeesHelper.WaitForText("The employee is successfully added", 10);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter agent name to search");
                    agents_EmployeesHelper.TypeText("EnterAgentName", "Employee Agent Tester");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    agents_EmployeesHelper.Select("SelectStatusAdjtmnt", "");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Sale Agent");
                    agents_EmployeesHelper.ClickElement("ClikOnEmployeeAgent");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Create btn Adjmnt");
                    agents_EmployeesHelper.ClickElement("ClickOnCreatebtnAdjmnt");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click on SaleAgent");
                    agents_EmployeesHelper.ClickElement("ClickSaleManager");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "EnterAdjustmentName");
                    agents_EmployeesHelper.TypeText("EnterAdjustmentName", "Employee Sale Manager");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectAdjustmentFor", "Agent");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("AdjustmentType", "Transaction");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectReportingPeriod", "00");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectProcessor");
                    agents_EmployeesHelper.Select("SelectProcessor", "Any");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectRuleType", "1");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter Amount");
                    agents_EmployeesHelper.TypeText("EnterAmount", "20");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "AddRemove");
                    agents_EmployeesHelper.Select("AddRemove", "Add");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "ClickOnSaveBtnAdjustmnet");
                    agents_EmployeesHelper.ClickElement("ClickOnSaveBtnAdjustmnet");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Verify Message");
                    agents_EmployeesHelper.VerifyPageText("Master Adjustment Rules Created Successfully.");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Redirect at adjustment tools page.");
                    VisitOffice("rir/adjustments_tool");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Verify page title.");
                    VerifyTitle("Adjustments Tool");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter adjustment to be deleted.");
                    residualIncome_MasterDataHelper.TypeText("EnterAdjustmentNameSrch", Adjustment);
                    residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click on delete icon.");
                    residualIncome_MasterDataHelper.ClickElement("DeleteAdjtmnt");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Accept alert message.");
                    residualIncome_MasterDataHelper.AcceptAlert();

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Wait for delete success.");
                    residualIncome_MasterDataHelper.WaitForText("Ruleset deleted successfully.", 10);
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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