ArCiGo

LLI Qualifying Borrower

Nov 24th, 2020
548
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* LLI stands for Lender Loan Information */
  2. [UITestMethod("LLI QUALIFYING BORROWER MODULE")]
  3. public void lLIQualifyingBorrowerModule()
  4. {
  5.   openApplicationPage();
  6.   util.waitForAjaxComplete();
  7.  
  8.   By lLIQualifyingBorrowerModuleLocator = By.Id("qualifyingBorrowerModalWrapper");
  9.  
  10.   if(getParameter("EditLLIQualifyingBorrowerModule"))
  11.   {
  12.     openModalOnApplicationPage("LLI Qualifying Borrower");
  13.     // util.waitForAjaxComplete();
  14.     util.waitForElementCondition(lLIQualifyingBorrowerModuleLocator, util.isVisible(lLIQualifyingBorrowerModuleLocator));
  15.   }
  16.  
  17.   enterInputs();
  18.  
  19.   util.waitForAjaxComplete();
  20.   Thread.Sleep(1000);
  21.   performValidations();
  22.  
  23.   if (getParameter("CloseLLIQualifyingBorrowerModule"))
  24.   {
  25.     String closeValue = getParameter("CloseLLIQualifyingBorrowerModule");
  26.  
  27.     if(closeValue.Equals("Cancel", StringComparison.InvariantCultureIgnoreCase))
  28.     {
  29.       util.click(By.Id("qualifyingBorrowerCancelBtn"));
  30.       logMessage("Canceling changes to LLI Qualifying Borrower module");
  31.     }
  32.     else if (closeValue.Equals("Save", StringComparison.InvariantCultureIgnoreCase))
  33.     {
  34.       util.click(By.Id("qualifyingBorrowerSaveBtn"));
  35.       logMessage("Saving changes to LLI Qualifying Borrower module");
  36.     }
  37.     else
  38.     {
  39.       util.click(By.CssSelector("div[aria-describedby='qualifyingBorrowerDialog'] button[title='close']"));
  40.       logMessage("Closing LLI Qualifying Borrower module using window close button");
  41.     }
  42.  
  43.     util.waitForAjaxComplete();
  44.     util.waitForElementCondition(lLIQualifyingBorrowerModuleLocator, !util.isVisible(lLIQualifyingBorrowerModuleLocator));
  45.   }
  46. }
  47.  
  48. On openModalOnApplicationPage(String modalButton) method.-
  49.  
  50. var editQualifyingBorrowerLink = By.Id("editQualifyingBorrowerLink");
  51.  
  52. else if (modalButton.Equals("LLI Qualifying Borrower", StringComparison.InvariantCultureIgnoreCase))
  53. {
  54.   util.click(editQualifyingBorrowerLink);
  55.   logMessage("Clicking on LLI Qualifying Borrower button")
  56. }
  57.  
  58. XML Test
  59.  
  60. <Task Name = "LLI Qualifying Borrower Module">
  61.   <Parameters>
  62.     <Parameter Name = "EditLLIQualifyingBorrowerModule">True</Parameter>
  63.     <Parameter Name = "CloseLLIQualifyingBorrowerModule">Save</Parameter>
  64.   </Parameters>
  65.   <Inputs>
  66.     <Input Name = "qualifyingBorrowerModalWrapper-Override">True</Input>
  67.  
  68.     <Input Name = "qualifyingBorrowerModalWrapper-salesContractPrice"></Input>
  69.     <Input Name = "qualifyingBorrowerModalWrapper-Improvements"></Input>
  70.     <Input Name = "qualifyingBorrowerModalWrapper-land"></Input>
  71.     <Input Name = "qualifyingBorrowerModalWrapper-refinance"></Input>
  72.     <Input Name = "qualifyingBorrowerModalWrapper-creditCards"></Input>
  73.     <Input Name = "qualifyingBorrowerModalWrapper-closingCosts"></Input>
  74.     <Input Name = "qualifyingBorrowerModalWrapper-discountPoints"></Input>
  75.  
  76.     <Input Name = "qualifyingBorrowerModalWrapper-loanAmountExc"></Input>
  77.     <Input Name = "qualifyingBorrowerModalWrapper-insurance"></Input>
  78.     <Input Name = "qualifyingBorrowerModalWrapper-otherLoans"></Input>
  79.  
  80.     <Input Name = "qualifyingBorrowerModalWrapper-sellerCredits"></Input>
  81.     <Input Name = "qualifyingBorrowerModalWrapper-otherCredits"></Input>
  82.   </Inputs>
  83.   <Validators>
  84.     <Validator Name = "qualifyingBorrowerModalWrapper-salesContractPrice"></Validator>
  85.     <Validator Name = "qualifyingBorrowerModalWrapper-Improvements"></Validator>
  86.     <Validator Name = "qualifyingBorrowerModalWrapper-land"></Validator>
  87.     <Validator Name = "qualifyingBorrowerModalWrapper-refinance"></Validator>
  88.     <Validator Name = "qualifyingBorrowerModalWrapper-creditCards"></Validator>
  89.     <Validator Name = "qualifyingBorrowerModalWrapper-closingCosts"></Validator>
  90.     <Validator Name = "qualifyingBorrowerModalWrapper-discountPoints"></Validator>
  91.     <Validator Name = "qualifyingBorrowerModalWrapper-totalDue"></Validator>
  92.  
  93.     <Validatoe Name = "qualifyingBorrowerModalWrapper-loanAmount"></Validator>
  94.     <Validator Name = "qualifyingBorrowerModalWrapper-loanAmountExc"></Validator>
  95.     <Validator Name = "qualifyingBorrowerModalWrapper-insurance"></Validator>
  96.     <Validator Name = "qualifyingBorrowerModalWrapper-otherLoans"></Validator>
  97.     <Validator Name = "qualifyingBorrowerModalWrapper-totalMortgageLoans"></Validator>
  98.  
  99.     <Validator Name = "qualifyingBorrowerModalWrapper-sellerCredits"></Validator>
  100.     <Validator Name = "qualifyingBorrowerModalWrapper-otherCredits"></Validator>
  101.     <Validator Name = "qualifyingBorrowerModalWrapper-totalCredits"></Validator>
  102.  
  103.     <Validator Name = "qualifyingBorrowerModalWrapper-totalDueFromBorrower"></Validator>
  104.     <Validator Name = "qualifyingBorrowerModalWrapper-lessTotal"></Validator>
  105.     <Validator Name = "qualifyingBorrowerModalWrapper-cashFromToBorrower"></Validator>
  106.   <Validators>
  107. </Task>
  108.  
  109. <Task Name = "Validate XPath">
  110.   <Validators>
  111.     <Validator By = "XPath" Name = "/Txn/OOBData/OutOfBandData/[id=OverrideQB]/[Data=True]">True</Validator>
  112.     <Validator By = "XPath" Name = "/Txn/OOBData/OutOfBandData/[id=URLASalesContractPriceTotalAmountQB]/Data"></Validator>
  113.     <Validator By = "XPath" Name = "/Txn/URLAImprovementsRenovationsRepairsTotalAmount"></Validator>
  114.     <Validator By = "XPath" Name = "/Txn/URLALotCostTotalAmount"></Validator>
  115.     <Validator By = "XPath" Name = "/Txn/OOBData/OutOfBandData/[id=TotalSubjectPropertyDebtsToBePaidOffAmounttQB]/Data"></Validator>
  116.     <Validator By = "XPath" Name = "/Txn/OOBData/OutOfBandData/[id=TotalNonSubjectPropertyDebtsToBePaidOffAmountQB]/Data"></Validator>
  117.     <Validator By = "XPath" Name = "/Txn/OOBData/OutOfBandData/[id=EstimatedClosingCostsAmountQB]/Data"></Validator>
  118.     <Validator By = "XPath" Name = "/Txn/OOBData/OutOfBandData/[id=DiscountFeeBorrowerWillPayAmountQB]/Data"></Validator>
  119.     <Validator By = "XPath" Name = "/Txn/OOBData/OutOfBandData/[id=URLABaseLoanAmountQB]/Data"></Validator>
  120.     <Validator By = "XPath" Name = "/Txn/OOBData/OutOfBandData/[id=MIAndFundingFeeFinancedAmountQB]/Data"></Validator>
  121.     <Validator By = "XPath" Name = "/Txn/OOBData/OutOfBandData/[id=URLATotalSubordinateFinancingAmountQB]/Data"></Validator>
  122.     <Validator By = "XPath" Name = "/Txn/OOBData/OutOfBandData/[id=URLATotalSellerCreditsAmountQB]/Data"></Validator>
  123.     <Validator By = "XPath" Name = "/Txn/OOBData/OutOfBandData/[id=URLATotalOtherCreditsAmountQB]/Data"></Validator>
  124.  
  125.     <Validator By = "XPath" Name = "/Txn/URLASalesContractPriceTotalAmount"></Validator>
  126.     <Validator By = "XPath" Name = "/Txn/Notes/Note/TotalSubjectPropertyDebtsToBePaidOffAmount"></Validator>
  127.     <Validator By = "XPath" Name = "/Txn/Notes/Note/TotalNonSubjectPropertyDebtsToBePaidOffAmount"></Validator>
  128.     <Validator By = "XPath" Name = "/Txn/Notes/Note/EstimatedClosingCostsAmount"></Validator>
  129.     <Validator By = "XPath" Name = "/Txn/Notes/Note/DiscountFeeBorrowerWillPayAmount"></Validator>
  130.     <Validator By = "XPath" Name = "/Txn/Notes/Note/URLABaseLoanAmount"></Validator>
  131.     <Validator By = "XPath" Name = "/Txn/Notes/Note[1]/MIAndFundingFeeFinancedAmount"></Validator>
  132.     <Validator By = "XPath" Name = "/Txn/URLATotalSubordinateFinancingAmount"></Validator>
  133.     <Validator By = "XPath" Name = "/Txn/Notes/Note[1]/URLATotalSellerCreditsAmount"></Validator>
  134.     <Validator By = "XPath" Name = "/Txn/Notes/Note[1]/URLATotalOtherCreditsAmount"></Validator>
  135.   </Validators>
  136. </Task>
RAW Paste Data