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 importAndCalculationRI() { // string[] username = null; // string[] password = null; var 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 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"); //File Date importAndCalculationRIHelper.ClickElement("FileDate"); //ClickOnDate importAndCalculationRIHelper.ClickElement("ClickOnDate"); var FileName = "D:\\pegqa\\TestAutomationProject\\PegasusTests\\Files\\FDN_Samples.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"); //Click On Calculation wizard importAndCalculationRIHelper.ClickElement("ClickOnCalculation"); importAndCalculationRIHelper.WaitForWorkAround(4000); //Click On Step1 importAndCalculationRIHelper.ClickElement("ClickOnStep1"); //Select Filter ReportingPeriod importAndCalculationRIHelper.TypeText("EnterRevenuePercentage", "50"); // Click On Apply CheckBox importAndCalculationRIHelper.ClickElement("ClickOnApplyCheckBox"); //Click ON Save button importAndCalculationRIHelper.ClickElement("ClickOnCalucationSaveBtn"); importAndCalculationRIHelper.WaitForWorkAround(3000); // Calculate Payout importAndCalculationRIHelper.ClickElement("CalculatePayout"); importAndCalculationRIHelper.WaitForElementVisible("//*[@id='imgdiv']/div[2]/img",20); importAndCalculationRIHelper.WaitForWorkAround(8000); // Publish Payout importAndCalculationRIHelper.ClickElement("PublishPayout"); importAndCalculationRIHelper.WaitForElementVisible("//*[@id='imgdiv']/div[2]/img", 20); // importAndCalculationRIHelper.elementpre(); // importAndCalculationRIHelper.WaitForWorkAround(8000); /* //################ LOGOUT ######################3 //Mover HoverWelcome importAndCalculationRIHelper.MouseHover("WelcomeMoveHover"); // Logout button importAndCalculationRIHelper.ClickElement("ClickOnWelcomeBack"); importAndCalculationRIHelper.WaitForWorkAround(4000); //################### OFFICE SIDE //Login with valid credential Username importAndCalculationRIHelper.TypeText("EnterUsernameOff", "AslamKhan"); //Login with valid credential password importAndCalculationRIHelper.TypeText("EnterPasswordOff", "1qaz!QAZ"); //Click On Login Button importAndCalculationRIHelper.ClickElement("ClickOnLoginButtojn"); //Click on Residual Income tab importAndCalculationRIHelper.ClickElement("OfficeResidualIncomeTab"); //Click to Import importAndCalculationRIHelper.redirectToPayout(); //#################################### 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"); //Click On Calculation wizard importAndCalculationRIHelper.ClickElement("ClickOnCalculation"); importAndCalculationRIHelper.WaitForWorkAround(3000); //################### START OVER // importAndCalculationRIHelper.ClickElement("clickOnStartOver"); // importAndCalculationRIHelper.WaitForWorkAround(3000); //############### AGENT OUT LOOK importAndCalculationRIHelper.ClickElement("AgentOutlook"); importAndCalculationRIHelper.WaitForWorkAround(6000); importAndCalculationRIHelper.elementLod("CalculateAdjustment"); //############## Calculate Ajustment importAndCalculationRIHelper.ClickElement("CalculateAdjustment"); //importAndCalculationRIHelper.calculateLod(); importAndCalculationRIHelper.elementLod("CalculatePayoutoff"); //############## CalculatePayout importAndCalculationRIHelper.ClickElement("CalculatePayoutoff"); importAndCalculationRIHelper.WaitForWorkAround(5000); //############ PublishLayout importAndCalculationRIHelper.elementLod("PublishLayout0ff"); importAndCalculationRIHelper.ClickElement("PublishLayout0ff"); importAndCalculationRIHelper.WaitForWorkAround(6000); // importAndCalculationRIHelper.elementLod(); //##################3 RESIDUAL INCOME //Click on Residual Income tab importAndCalculationRIHelper.ClickElement("OfficeResidualIncomeTab"); //Click to Import importAndCalculationRIHelper.redirectToPayout(); importAndCalculationRIHelper.WaitForWorkAround(5000); */ }