Пример #1
0
        public void verifyResidualReportPublished()
        {
            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 residual_income_officePayoutHelper = new ResidualIncome_OfficePayoutHelper(GetWebDriver());


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

            //try
            //{

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

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

            executionLog.Log("VerifyResidualReportPublished", "Go to Residual Income Reports");
            VisitOffice("rir/reports");
            residual_income_officePayoutHelper.WaitForWorkAround(2000);

            executionLog.Log("VerifyResidualReportPublished", "Select Reporting Period");
            residual_income_officePayoutHelper.Select("ReportingPeriod", "2017-02-01");

            executionLog.Log("VerifyResidualReportPublished", "Select File Date");
            residual_income_officePayoutHelper.Select("FileDate", "2017-02-27");

            executionLog.Log("VerifyResidualReportPublished", "Select Processor");
            residual_income_officePayoutHelper.Select("Processor", "First Data North");
            residual_income_officePayoutHelper.WaitForWorkAround(4000);

            executionLog.Log("VerifyResidualReportPublished", "Select File Format");
            residual_income_officePayoutHelper.Select("FileFormat", "Pegasus");

            executionLog.Log("VerifyResidualReportPublished", "Search Payouts");
            residual_income_officePayoutHelper.ClickElement("SearchBtn");
            residual_income_officePayoutHelper.WaitForWorkAround(6000);

            executionLog.Log("VerifyResidualReportPublished", "Verify Reports Generated");
            residual_income_officePayoutHelper.VerifyPageText("NewThemeCorp Residual Reports");


            //}
            //catch (Exception e)
            //{



            //}
        }
Пример #2
0
        public void exportingReportInPartnerAgent()
        {
            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 residual_income_officePayoutHelper = new ResidualIncome_OfficePayoutHelper(GetWebDriver());


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

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

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

                executionLog.Log("ExportingReportInPartnerAgent ", "Redirect To Report Columns page");
                GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/newthemecorp/pegasustestoffice/rir/report_columns");
                residual_income_officePayoutHelper.WaitForWorkAround(2000);

                executionLog.Log("ExportingReportInPartnerAgent ", "Check Merchant ID checkbox");
                bool checkbox = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnMerchantNumber']");
                if (checkbox == false)
                {
                    residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnMerchantNumber']");
                }
                else
                {
                }

                executionLog.Log("ExportingReportInPartnerAgent ", "Uncheck Sales Transaction checkbox");
                bool checkbox2 = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnSalesTrans']");
                if (checkbox == true)
                {
                    residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnSalesTrans']");
                }
                else
                {
                }

                executionLog.Log("ExportingReportInPartnerAgent ", "Uncheck Average Ticket checkbox");
                bool checkbox3 = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnAvgTicket']");
                if (checkbox3 == true)
                {
                    residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnAvgTicket']");
                }
                else
                {
                }

                executionLog.Log("ExportingReportInPartnerAgent ", "Uncheck Office Income checkbox");
                bool checkbox4 = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnOfficeIncome']");
                if (checkbox4 == true)
                {
                    residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnOfficeIncome']");
                }
                else
                {
                }

                executionLog.Log("ExportingReportInPartnerAgent ", "Uncheck Office Adjustment checkbox");
                bool checkbox5 = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnAdjustment']");
                if (checkbox5 == true)
                {
                    residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnAdjustment']");
                }
                else
                {
                }

                executionLog.Log("ExportingReportInPartnerAgent ", "Uncheck Agent Revenue Share checkbox");
                bool checkbox6 = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnRevShare']");
                if (checkbox5 == true)
                {
                    residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnRevShare']");
                }
                else
                {
                }

                executionLog.Log("ExportingReportInPartnerAgent ", "Click on Save button");
                residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnReportColumnsForm']/div[4]/div/button");

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Wait for creation success text.");
                residual_income_officePayoutHelper.WaitForText("Report display columns updated successfully.", 10);

                executionLog.Log("ExportingReportInPartnerAgent ", "Logout from the application.");
                VisitOffice("logout");

                executionLog.Log("ExportingReportInPartnerAgent ", "Login with valid username and password");
                Login("aslampartneragent", "123456");
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
                residual_income_officePayoutHelper.WaitForWorkAround(3000);

                executionLog.Log("ExportingReportInPartnerAgent ", "Redirect To Report Columns page");
                GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/newthemecorp/pegasustestoffice/partners/reports");
                residual_income_officePayoutHelper.WaitForWorkAround(2000);


                executionLog.Log("ExportingReportInPartnerAgent ", "Select Reporting Period");
                residual_income_officePayoutHelper.Select("ReportingPeriod", "2018-04-01");

                executionLog.Log("ExportingReportInPartnerAgent ", "Select File Date");
                residual_income_officePayoutHelper.Select("FileDate", "2018-03-01");

                executionLog.Log("ExportingReportInPartnerAgent ", "Select Processor");
                residual_income_officePayoutHelper.Select("Processor", "FIRST BANK OF DELAWARE");
                residual_income_officePayoutHelper.WaitForWorkAround(4000);

                executionLog.Log("ExportingReportInPartnerAgent ", "Select File Format");
                residual_income_officePayoutHelper.Select("FileFormat", "Pegasus");

                executionLog.Log("ExportingReportInPartnerAgent ", "Search Payouts");
                residual_income_officePayoutHelper.ClickElement("Searchreport");
                residual_income_officePayoutHelper.WaitForWorkAround(6000);

                executionLog.Log("ExportingReportInPartnerAgent ", "Verify Reports Generated");
                residual_income_officePayoutHelper.VerifyPageText("NewThemeCorp Residual Reports");

                executionLog.Log("ExportingReportInPartnerAgent ", "Click on Export in Excel");
                residual_income_officePayoutHelper.ClickElement("Exportexl");
                residual_income_officePayoutHelper.WaitForWorkAround(2000);

                executionLog.Log("ExportingReportInPartnerAgent ", "Click on Export in PDF");
                residual_income_officePayoutHelper.ClickElement("Exportpdf");
                residual_income_officePayoutHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ExportingReportInPartnerAgent ");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("ExportingReportInPartnerAgent ");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Exporting Report In Partner Agent ", "Bug", "Medium", "Corp Employee page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Exporting Report In Partner Agent ");
                        TakeScreenshot("ExportingReportInPartnerAgent ");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ExportingReportInPartnerAgent .png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ExportingReportInPartnerAgent ");
                        string id            = loginHelper.getIssueID("Exporting Report In Partner Agent ");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ExportingReportInPartnerAgent .png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Exporting Report In Partner Agent "), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Exporting Report In Partner Agent ");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ExportingReportInPartnerAgent ");
                executionLog.WriteInExcel("Exporting Report In Partner Agent ", Status, JIRA, "Corp Employee");
            }
        }
Пример #3
0
        public void verifyResetBtnOfSummaryReportsOfficePayouts()
        {
            string[] username = 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 residualIncome_OfficePayoutHelper = new ResidualIncome_OfficePayoutHelper(GetWebDriver());

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

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

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

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

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Go to Create Call page");
                VisitOffice("rir/summary_reports");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Observe Total records");
                string txt = residualIncome_OfficePayoutHelper.GetText("//td[@id='list1_pager_left']/div");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Click on Filters");
                residualIncome_OfficePayoutHelper.ClickElement("FiltersBtn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Click on Processor drop down");
                residualIncome_OfficePayoutHelper.ClickElement("Processordrpdwn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Select First Data North");
                residualIncome_OfficePayoutHelper.ClickElement("Proc3Optn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Click on Apply Button");
                residualIncome_OfficePayoutHelper.ClickElement("ApplyBtn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Click on Filters");
                residualIncome_OfficePayoutHelper.ClickElement("FiltersBtn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Click on Reset Button");
                residualIncome_OfficePayoutHelper.ClickElement("ResetBtn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Verify Reset button works");
                residualIncome_OfficePayoutHelper.VerifyText("NoOfRecrdsTxt", txt);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // Variable
            var    Id     = "12345" + GetRandomNumber();
            String Jira   = "";
            String Status = "Pass";

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

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

            executionLog.Log("PartnerReportFullName", "Redirect To Report Columns page");
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/newthemecorp/pegasustestoffice/rir/reports");
            residual_income_officePayoutHelper.WaitForWorkAround(2000);

            executionLog.Log("PartnerReportFullName", "Select Reporting Period");
            residual_income_officePayoutHelper.Select("ReportingPeriod", "2018-04-01");

            executionLog.Log("PartnerReportFullName", "Select File Date");
            residual_income_officePayoutHelper.Select("FileDate", "2018-03-01");

            executionLog.Log("PartnerReportFullName", "Select Processor");
            residual_income_officePayoutHelper.Select("Processor", "FIRST BANK OF DELAWARE");
            residual_income_officePayoutHelper.WaitForWorkAround(4000);

            executionLog.Log("PartnerReportFullName", "Select File Format");
            residual_income_officePayoutHelper.Select("FileFormat", "Pegasus");

            executionLog.Log("PartnerReportFullName", "Search Payouts");
            residual_income_officePayoutHelper.ClickElement("SearchBtn");
            residual_income_officePayoutHelper.WaitForWorkAround(6000);

            executionLog.Log("PartnerReportFullName", "Select Partner Agent");
            residual_income_officePayoutHelper.ClickElement("AslamPartnerCheckBox");

            executionLog.Log("PartnerReportFullName", "Verify Reports Generated");
            residual_income_officePayoutHelper.VerifyPageText("NewThemeCorp Residual Reports");

            executionLog.Log("PartnerReportFullName", "Verify Partner Agent Name");
            String pname1 = residual_income_officePayoutHelper.GetText("//*[@id='right']/div[3]/div[1]/table/tbody/tr[3]/td[2]/span");

            executionLog.Log("PartnerReportFullName ", "Logout from the application.");
            VisitOffice("logout");

            executionLog.Log("PartnerReportFullName ", "Login with valid username and password");
            Login("aslampartneragent", "123456");
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
            residual_income_officePayoutHelper.WaitForWorkAround(3000);

            executionLog.Log("PartnerReportFullName ", "Redirect To Report Columns page");
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/newthemecorp/pegasustestoffice/partners/reports");
            residual_income_officePayoutHelper.WaitForWorkAround(2000);

            executionLog.Log("PartnerReportFullName ", "Select Reporting Period");
            residual_income_officePayoutHelper.Select("ReportingPeriod", "2018-04-01");

            executionLog.Log("PartnerReportFullName ", "Select File Date");
            residual_income_officePayoutHelper.Select("FileDate", "2018-03-01");

            executionLog.Log("PartnerReportFullName ", "Select Processor");
            residual_income_officePayoutHelper.Select("Processor", "FIRST BANK OF DELAWARE");
            residual_income_officePayoutHelper.WaitForWorkAround(4000);

            executionLog.Log("PartnerReportFullName ", "Select File Format");
            residual_income_officePayoutHelper.Select("FileFormat", "Pegasus");

            executionLog.Log("PartnerReportFullName ", "Search Payouts");
            residual_income_officePayoutHelper.ClickElement("Searchreport");
            residual_income_officePayoutHelper.WaitForWorkAround(6000);

            executionLog.Log("PartnerReportFullName ", "Verify Reports Generated");
            residual_income_officePayoutHelper.VerifyPageText("NewThemeCorp Residual Reports");

            executionLog.Log("PartnerReportFullName", "Verify Partner Agent Name");
            String pname2 = residual_income_officePayoutHelper.GetText("//*[@id='right']/div[2]/table/tbody/tr[3]/td[2]");

            executionLog.Log("PartnerReportFullName", "Verify Partner Agent Full Name");
            Assert.AreEqual(pname1, pname2);
            Console.WriteLine("Partner Agent Full Name is Appearing");
        }