예제 #1
0
        public void editOmahaPDFCorp()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

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

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

            //Initializing the objects
            var loginHelper               = new LoginHelper(GetWebDriver());
            var clientHelper              = new ClientsHelper(GetWebDriver());
            var loginAsCorpHelper         = new LoginAsCorpHelper(GetWebDriver());
            var createPDFCategoriesHelper = new CreatePDFCategoriesHelper(GetWebDriver());
            var clientBugsHelper          = new ClientBugsHelper(GetWebDriver());
            //Variable random

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



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

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


            //Click on Click On Partner Agent
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/pdf_templates");
            clientBugsHelper.WaitForWorkAround(4000);

            //Enter Name
            clientBugsHelper.TypeText("OmahaFirst", "First Data - Omaha");
            clientBugsHelper.WaitForWorkAround(4000);

            //Click on Omaha
            clientBugsHelper.ClickElement("ClickOnEdit");
            clientBugsHelper.WaitForElementPresent("EnterName", 30);

            // Enter Name
            clientBugsHelper.TypeText("EnterName", "First Data - Omaha");

            //Click On Save
            clientBugsHelper.ClickElement("ClickOnSaveBtnPDFTemp");
            clientBugsHelper.WaitForWorkAround(4000);
        }
예제 #2
0
        public void importResidualIncome2014()
        {
            var oXMLData = new XMLParse();

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

            //Initializing the objects
            var loginHelper  = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var importAndCalculationRIHelper = new ImportAndCalculationRIHelper(GetWebDriver());
            var loginAsCorpHelper            = new LoginAsCorpHelper(GetWebDriver());


            //Login with valid credential  Username
            loginAsCorpHelper.TypeText("EnterUsername", "selcorp");

            //Login with valid credential password
            loginAsCorpHelper.TypeText("EnterPassword", "seWelcome2");

            //Click On Login Button
            loginAsCorpHelper.ClickElement("ClickOnLoginButton");


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

            //Click on Residual Income tab
            importAndCalculationRIHelper.ClickElement("ClickResidualIncomeTab");

            //Click to Import
            importAndCalculationRIHelper.redirectToPage();

            //Click On Import New button
            importAndCalculationRIHelper.ClickElement("ClickOnImportNew");

            //Processor
            importAndCalculationRIHelper.Select("ProcessorType", "First Data North");
            importAndCalculationRIHelper.WaitForWorkAround(3000);

            //Reporting Period
            importAndCalculationRIHelper.Select("ReportingPeriod", "11");

            //Reporting Year
            importAndCalculationRIHelper.Select("ReportingYear", "2014");

            //File Date
            importAndCalculationRIHelper.ClickElement("FileDate");
            importAndCalculationRIHelper.ClickElement("ClickOnDate");


            var FileName = GetPathToFile() + "FirstDataNorth_ResidualSamples - Small.csv";

            importAndCalculationRIHelper.Upload("SelectBrowseCSVFile", FileName);
            importAndCalculationRIHelper.WaitForWorkAround(4000);

            //Import
            importAndCalculationRIHelper.ClickElement("ClickOnImportBtn");
            importAndCalculationRIHelper.WaitForWorkAround(5000);

//##################################  SET FILTER  ##################################

            //Select Filter ReportingPeriod
            importAndCalculationRIHelper.Select("SelectFiletReportingPeriod", "November 2015");

            // Select Processor Filer
            importAndCalculationRIHelper.Select("SelectProcessorFiler", "First Data North");

            //Select Filter FileFormat
            importAndCalculationRIHelper.Select("FilterFileFormat", "First Data North");

            //Select Filter ReportingPeriod
            importAndCalculationRIHelper.TypeText("FileName", "FDN_Samples");

            //Select Status
            importAndCalculationRIHelper.Select("SelectStatus", "Imported");
        }
        public void pDFCategoriesViewInOffice()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

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

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

            //Initializing the objects
            LoginHelper               loginHelper               = new LoginHelper(GetWebDriver());
            ClientsHelper             clientHelper              = new ClientsHelper(GetWebDriver());
            LoginAsCorpHelper         loginAsCorpHelper         = new LoginAsCorpHelper(GetWebDriver());
            CreatePDFCategoriesHelper createPDFCategoriesHelper = new CreatePDFCategoriesHelper(GetWebDriver());

            //Variable random

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


            //Login with valid credential  Username
            loginAsCorpHelper.TypeText("EnterUsername", "selcorp");

            //Login with valid credential password
            loginAsCorpHelper.TypeText("EnterPassword", "seWelcome2");

            //Click On Login Button
            loginAsCorpHelper.ClickElement("ClickOnLoginButton");
            loginAsCorpHelper.WaitForWorkAround(3000);

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

            //Click on Agent in Topmenu
            createPDFCategoriesHelper.ClickElement("ClickOnPDFTemplateTab");


//################################# ADD NEW CATEGORY  #############################################

            //Click on Click On Partner Agent
            createPDFCategoriesHelper.redirectToPage();

            //Click on PDF Category
            //     createPDFCategoriesHelper.ClickElement("ClickOnPDFCategory");

            //Click on Click create button
            createPDFCategoriesHelper.ClickElement("ClickOnCreateBtn");
            createPDFCategoriesHelper.WaitForWorkAround(6000);

            //Enter Name
            createPDFCategoriesHelper.TypeText("EnterName", name);

            //Click on Save Button
            createPDFCategoriesHelper.ClickElement("ClickOnSaveBtn");

            //Verify text present
            createPDFCategoriesHelper.VerifyPageText("Category Created Successfully");
            createPDFCategoriesHelper.WaitForWorkAround(3000);


            //Redirect To Url
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/logout");
            createPDFCategoriesHelper.WaitForWorkAround(3000);

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

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


            //Click on PDF Tab
            createPDFCategoriesHelper.ClickElement("ClickOnPDFTab");

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

            //Verify Text
            createPDFCategoriesHelper.VerifyPageText("name");
            createPDFCategoriesHelper.WaitForWorkAround(4000);
        }
        public void systemPickListeAddressLabelIms()
        {
            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 system_PicklistsHelper = new System_PicklistsHelper(GetWebDriver());
            var loginAsCorpHelper      = new LoginAsCorpHelper(GetWebDriver());

            // Variable
            var    AddressType = "Test" + RandomNumber(1, 99);
            var    Test        = "New" + GetRandomNumber();
            String JIRA        = "";
            String Status      = "Pass";

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

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

                executionLog.Log("SystemPickListAddressType", "Redirect To PickList");
                VisitOffice("pick-lists");

                executionLog.Log("SystemPickListAddressType", "Verify Page title");
                VerifyTitle("Picklists");

                executionLog.Log("SystemPickListeAddressLabelIms", "Click On Link Address Type");
                system_PicklistsHelper.ClickElement("eAddressLabelIMS");

                executionLog.Log("SystemPickListeAddressLabelIms", "Click On Add New Item");
                system_PicklistsHelper.ClickElement("AddNewItem");

                executionLog.Log("SystemPickListeAddressLabelIms", "Add New Item");
                system_PicklistsHelper.TypeText("PicklistItem", AddressType);

                executionLog.Log("SystemPickListeAddressLabelIms", "Click on Save ");
                system_PicklistsHelper.ClickElement("Save");

                executionLog.Log("SystemPickListeAddressLabelIms", "Click on Residual Income tab");
                system_PicklistsHelper.ClickElement("Cancel");
                system_PicklistsHelper.WaitForWorkAround(4000);

                executionLog.Log("SystemPickListeAddressLabelIms", "Verfiy Text");
                system_PicklistsHelper.VerifyPageText(AddressType);

                executionLog.Log("SystemPickListeAddressLabelIms", "Click delete Button");
                system_PicklistsHelper.ClickElement("DeletePick");
                system_PicklistsHelper.WaitForWorkAround(3000);

                executionLog.Log("SystemPickListeAddressLabelIms", "Click on item to deleted");
                system_PicklistsHelper.DeletePickList(AddressType);

                executionLog.Log("SystemPickListeAddressLabelIms", "Selelct replace with item.");
                system_PicklistsHelper.SelectText("ReplacePiclist", "Other");

                executionLog.Log("SystemPickListeAddressLabelIms", "Click PickList Save Button");
                system_PicklistsHelper.ClickElement("PickListSaveBtn");

                executionLog.Log("SystemPickListeAddressLabelIms", "Accept alert message.");
                system_PicklistsHelper.AcceptAlert();
                system_PicklistsHelper.WaitForWorkAround(4000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("SystemPickListeAddressLabelIms");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("System Pick Liste Address Label Ims");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("System Pick Liste Address Label Ims", "Bug", "Medium", "system pick page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("System Pick Liste Address Label Ims");
                        TakeScreenshot("SystemPickListeAddressLabelIms");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\SystemPickListeAddressLabelIms.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("SystemPickListeAddressLabelIms");
                        string id            = loginHelper.getIssueID("System Pick Liste Address Label Ims");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\SystemPickListeAddressLabelIms.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("System Pick Liste Address Label Ims"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("System Pick Liste Address Label Ims");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("SystemPickListeAddressLabelIms");
                executionLog.WriteInExcel("System Pick Liste Address Label Ims", Status, JIRA, "Pick List Management");
            }
        }
        public void residualIncomeImportFile()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

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

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

            //Initializing the objects
            var loginHelper             = new LoginHelper(GetWebDriver());
            var clientHelper            = new ClientsHelper(GetWebDriver());
            var loginAsCorpHelper       = new LoginAsCorpHelper(GetWebDriver());
            var resdiualIncmeSkipHelper = new ResdiualIncmeSkipHelper(GetWebDriver());
            var resdiualIncmeFstDataNrthHelperRevnueShareSet = new ResdiualIncmeFstDataNrthHelperRevnueShareSet(GetWebDriver());
            var clientBugsHelper = new ClientBugsHelper(GetWebDriver());


            //Login with valid credential  Username
            loginAsCorpHelper.TypeText("EnterUsername", "selcorp");

            //Login with valid credential password
            loginAsCorpHelper.TypeText("EnterPassword", "seWelcome2");

            //Click On Login Button
            loginAsCorpHelper.ClickElement("ClickOnLoginButton");


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

            //Click on Residual Income tab
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickResidualIncomeTab");

            //Click to Import
            resdiualIncmeFstDataNrthHelperRevnueShareSet.redirectToPage();

            //Click On Import New button
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnImportNew");

            //Processor
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("ProcessorType", "First Data North");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(3000);

            //Reporting Period
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("ReportingPeriod", "11");

            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectYr", "2016");

            //File Date
            clientBugsHelper.ClickElement("ClickOnFileDate");

            //Click on Date
            clientBugsHelper.ClickElement("SelectDate");

            var FileName = "D:\\pegqa\\TestAutomationProject\\PegasusTests\\Files\\FirstDataNorth_ResidualSamples - Small.csv";

            resdiualIncmeFstDataNrthHelperRevnueShareSet.Upload("SelectBrowseCSVFile", FileName);
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(4000);

            //Import
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnImportBtn");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(5000);

//##################################  SET FILTER  ##################################

            //Select Filter ReportingPeriod
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectFiletReportingPeriod", "November 2016");

            // Select Processor Filer
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectProcessorFiler", "First Data North");

            //Select Filter FileFormat
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("FilterFileFormat", "First Data North");

            //Select Filter ReportingPeriod
            resdiualIncmeFstDataNrthHelperRevnueShareSet.TypeText("FileName", "FirstDataNorth_ResidualSamples - Small");

            //Select Status
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectStatus", "Imported");

//#############   CALCULATION WIZARD


            //Click On Calculation wizard
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnCalculation");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(4000);

            //Click On Step1
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnSkipRecal1");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(6000);

            //Click on skip step 2
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickSkipStp2Recal");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(6000);



            // Publish Payout
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("PublishPayout");
            //     resdiualIncmeFstDataNrthHelper.elementpre();
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(8000);


            //##################################  SET FILTER  ##################################

            //Select Filter ReportingPeriod
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectFiletReportingPeriod", "November 2016");

            // Select Processor Filer
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectProcessorFiler", "First Data North");

            //Select Filter FileFormat
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("FilterFileFormat", "First Data North");

            //Select Filter ReportingPeriod
            resdiualIncmeFstDataNrthHelperRevnueShareSet.TypeText("FileName", "FirstDataNorth_ResidualSamples - Small");

            //Select Status
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectStatus", "Published");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(4000);
        }
        public void residualIncomePublishPayoutFromOffice()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

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

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

            //Initializing the objects
            var loginHelper             = new LoginHelper(GetWebDriver());
            var clientHelper            = new ClientsHelper(GetWebDriver());
            var loginAsCorpHelper       = new LoginAsCorpHelper(GetWebDriver());
            var resdiualIncmeSkipHelper = new ResdiualIncmeSkipHelper(GetWebDriver());
            var resdiualIncmeFstDataNrthHelperRevnueShareSet = new ResdiualIncmeFstDataNrthHelperRevnueShareSet(GetWebDriver());
            var clientBugsHelper = new ClientBugsHelper(GetWebDriver());


            //Login with valid credential  Username
            loginAsCorpHelper.TypeText("EnterUsername", "selcorp");

            //Login with valid credential password
            loginAsCorpHelper.TypeText("EnterPassword", "seWelcome2");

            //Click On Login Button
            loginAsCorpHelper.ClickElement("ClickOnLoginButton");


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

            //Click on Residual Income tab
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickResidualIncomeTab");

            //Click to Import
            resdiualIncmeFstDataNrthHelperRevnueShareSet.redirectToPage();

            //Click On Import New button
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnImportNew");

            //Processor
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("ProcessorType", "First Data North");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(3000);

            //Reporting Period
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("ReportingPeriod", "11");

            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectYr", "2016");

            //File Date
            clientBugsHelper.ClickElement("ClickOnFileDate");

            //Click on Date
            clientBugsHelper.ClickElement("SelectDate");

            var FileName = "D:\\pegqa\\TestAutomationProject\\PegasusTests\\Files\\FirstDataNorth_ResidualSamples - Small.csv";

            resdiualIncmeFstDataNrthHelperRevnueShareSet.Upload("SelectBrowseCSVFile", FileName);
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(4000);

            //Import
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnImportBtn");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(5000);

//##################################  SET FILTER  ##################################

            //Select Filter ReportingPeriod
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectFiletReportingPeriod", "November 2016");

            // Select Processor Filer
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectProcessorFiler", "First Data North");

            //Select Filter FileFormat
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("FilterFileFormat", "First Data North");

            //Select Filter ReportingPeriod
            resdiualIncmeFstDataNrthHelperRevnueShareSet.TypeText("FileName", "FirstDataNorth_ResidualSamples - Small");

            //Select Status
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectStatus", "Imported");

//#############   CALCULATION WIZARD


            //Click On Calculation wizard
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnCalculation");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(4000);

            //Click On Step1
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnSkipRecal1");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(6000);

            //Click on skip step 2
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickSkipStp2Recal");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(6000);



            // Publish Payout
            resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("PublishPayout");
            //     resdiualIncmeFstDataNrthHelper.elementpre();
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(8000);


            //##################################  SET FILTER  ##################################

            //Select Filter ReportingPeriod
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectFiletReportingPeriod", "November 2016");

            // Select Processor Filer
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectProcessorFiler", "First Data North");

            //Select Filter FileFormat
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("FilterFileFormat", "First Data North");

            //Select Filter ReportingPeriod
            resdiualIncmeFstDataNrthHelperRevnueShareSet.TypeText("FileName", "FirstDataNorth_ResidualSamples - Small");

            //Select Status
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectStatus", "Published");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(4000);

            //Logout
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/logout");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(3000);

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


            //Click on Residual Income Tab
            clientBugsHelper.ClickElement("ClickOnPDFTemplates");
            clientBugsHelper.WaitForWorkAround(3000);

            //Redirect To URL
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/rir/payout_summary");
            resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(3000);


            //Select Filter ReportingPeriod
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectFiletReportingPeriod", "November 2016");

            // Select Processor Filer
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectProcessorFiler", "First Data North");

            //Select Filter FileFormat
            resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("FilterFileFormat", "First Data North");

            //Select Filter ReportingPeriod
//            resdiualIncmeFstDataNrthHelperRevnueShareSet.TypeText("FileName", "FirstDataNorth_ResidualSamples - Small");

            //Select Status New
            clientBugsHelper.Select("SelectStatusRIReport", "New");
            clientBugsHelper.WaitForWorkAround(3000);

            //Click On Calculation Wizard
            clientBugsHelper.ClickElement("ClickOnCalculationWizard");

            //Agent LookUp
            clientBugsHelper.ClickElement("AgentLookUp");
            clientBugsHelper.WaitForWorkAround(3000);

            //Calculate Adjustment
            clientBugsHelper.ClickElement("CalculateAdjustment");
            clientBugsHelper.WaitForWorkAround(3000);
            clientBugsHelper.VerifyPageText("Adjustments calculation successfully completed");


            //AgentPayout Calculation
            clientBugsHelper.ClickElement("AgentPayoutCalculation");
            clientBugsHelper.WaitForWorkAround(3000);


            //Click Publish
            clientBugsHelper.ClickElement("ClickPublish");
            clientBugsHelper.WaitForWorkAround(3000);
            clientBugsHelper.VerifyPageText("Payouts Published.");

            //View Published PayoutRI
            clientBugsHelper.ClickElement("ViewPublishedPayoutRI");
            clientBugsHelper.WaitForWorkAround(3000);
        }
예제 #7
0
        public void loginAsCorp()
        {
            string[] username = null;
            string[] password = null;


            XMLParse oXMLData = new XMLParse();

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

            // Initializing the objects
            var executionLog      = new ExecutionLog();
            var loginHelper       = new LoginHelper(GetWebDriver());
            var loginAsCorpHelper = new LoginAsCorpHelper(GetWebDriver());

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

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

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

                executionLog.Log("LoginAsCorp", "Verify page title");
                VerifyTitle("Dashboard");


                executionLog.Log("LoginAsCorp", "Wait for some time.");
                loginAsCorpHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            XMLParse oXMLData = new XMLParse();

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

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

            //Initializing the objects
            LoginHelper               loginHelper               = new LoginHelper(GetWebDriver());
            ClientsHelper             clientHelper              = new ClientsHelper(GetWebDriver());
            LoginAsCorpHelper         loginAsCorpHelper         = new LoginAsCorpHelper(GetWebDriver());
            CreatePDFCategoriesHelper createPDFCategoriesHelper = new CreatePDFCategoriesHelper(GetWebDriver());

            //Variable random

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


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

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

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

            //Redirect To
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/pdf_templates/categories");
            createPDFCategoriesHelper.WaitForWorkAround(6000);

            //Click on Click create button
            createPDFCategoriesHelper.ClickElement("ClickOnCreateBtn");
            createPDFCategoriesHelper.WaitForWorkAround(6000);


            //Enter Name
            createPDFCategoriesHelper.TypeText("EnterName", name);

            //Click on Save Button
            createPDFCategoriesHelper.ClickElement("ClickOnSaveBtn");
            createPDFCategoriesHelper.WaitForWorkAround(6000);

            //Verify text present
            createPDFCategoriesHelper.VerifyPageText("Category Created Successfully");

            //Clcik on Delete
            createPDFCategoriesHelper.SearchAndClick(name);
            createPDFCategoriesHelper.AcceptAlert();
            createPDFCategoriesHelper.ClickDisplayed("//a[@title='Save']");
            createPDFCategoriesHelper.WaitForWorkAround(4000);
            //   GetWebDriver().Navigate().Refresh();


            createPDFCategoriesHelper.VerifyPageText("Category Replaced Successfully.");
        }