XML : RSpec test uploaded xml file that fills out dynamic form

I am writing an automation test suite using RSpec, capybara, selenium web driver, and poltergeist. I do not have access to the codebase of the web app itself, only the test suite.

What happens is the client uploads an xml file, pieces of that xml file populate a form. The form is also dynamic, so fields can be added dependent on the contents of the xml file.

My mission is to write a test that ensures that the values of the xml file match what is being populated within the form.

Any help would be greatly appreciated. Below is a sample of one of the xml files I am attempting to test.

  <?xml version="1.0" encoding="UTF-8"?>  <LOAN_APPLICATION>  <_DATA_INFORMATION>  <DATA_VERSION _Name="Date" _Number="20140926"/>  <DATA_VERSION _Name="1003" _Number="3.20"/>  </_DATA_INFORMATION>  <ADDITIONAL_CASE_DATA>  <TRANSMITTAL_DATA BelowMarketSubordinateFinancingIndicator="N" BuydownRatePercent="0.000" CurrentFirstMortgageHolderType="Unknown" PropertyAppraisedValueAmount="218182.21" InvestorLoanIdentifier="" InvestorInstitutionIdentifier="" LoanOriginatorID="12789012" LoanOriginationCompanyID="16789111"/>  </ADDITIONAL_CASE_DATA>  <ASSET _CashOrMarketValueAmount="10000.00" _Type="EarnestMoneyCashDepositTowardPurchase" _HolderName="ABC Realty" _HolderStreetAddress="3700 Connecticut St" _HolderCity="Orlando" _HolderState="PA" _HolderPostalCode="19040" OtherAssetTypeDescription="Earnest Money Deposit" BorrowerID="Borr250612677"/>  <ASSET _AccountIdentifier="123456" _CashOrMarketValueAmount="12000.00" _Type="CheckingAccount" _HolderName="Bank of Noosh" _HolderStreetAddress="15096 Sunnyside St" _HolderCity="Orlando" _HolderState="PA" _HolderPostalCode="19040" OtherAssetTypeDescription="Checking" BorrowerID="Borr250612677"/>  <ASSET _AccountIdentifier="1234567" _CashOrMarketValueAmount="100000.00" _Type="CertificateOfDepositTimeDeposit" _HolderName="Bank of Noosh" _HolderStreetAddress="15096 Sunnyside St" _HolderCity="Orlando" _HolderState="PA" _HolderPostalCode="19040" OtherAssetTypeDescription="30-Day CD" BorrowerID="Borr250612677"/>  <ASSET _AccountIdentifier="6465456" _CashOrMarketValueAmount="50000.00" _Type="TrustAccount" _HolderName="Fidelity Investments" _HolderStreetAddress="1234 Wall St" _HolderCity="New York" _HolderState="NY" _HolderPostalCode="01016" OtherAssetTypeDescription="Living Trust" BorrowerID="Borr250612677"/>  <ASSET _AccountIdentifier="55555" _CashOrMarketValueAmount="120000.00" _Type="MutualFund" _HolderName="UBS" _HolderStreetAddress="111 Wall St" _HolderCity="New York" _HolderState="NY" _HolderPostalCode="01016" OtherAssetTypeDescription="Mutual Fund" BorrowerID="Borr250612677"/>  <DOWN_PAYMENT _Amount="10000.00" _SourceDescription="ABC Realty" _Type="DepositOnSalesContract"/>  <DOWN_PAYMENT _Amount="50000.00" _SourceDescription="Trust" _Type="TrustFunds"/>  <DOWN_PAYMENT _Amount="4200.00" _SourceDescription="$100/month" _Type="RentWithOptionToPurchase"/>  <GOVERNMENT_REPORTING HMDA_HOEPALoanStatusIndicator="N" HMDAPreapprovalType="PreapprovalWasNotRequested"/>  <INTERVIEWER_INFORMATION InterviewersEmployerStreetAddress="412 H St, NW" InterviewersEmployerCity="Washington" InterviewersEmployerState="DC" InterviewersEmployerPostalCode="200121234" InterviewersTelephoneNumber="2023333333" ApplicationTakenMethodType="FaceToFace" InterviewerApplicationSignedDate="20111011" InterviewersEmployerName="ABC Mortgage" InterviewersName="John Done"/>  <LIABILITY _ID="Liab1" BorrowerID="Borr250612677" _AccountIdentifier="98E543184026" _ExclusionIndicator="N" _HolderName="HEMLOCKS" _MonthlyPaymentAmount="44.00" _PayoffStatusIndicator="N" _RemainingTermMonths="10" _Type="Revolving" _UnpaidBalanceAmount="437.00" SubjectLoanResubordinationIndicator="N" FNMSubjectPropertyIndicator="N" FNMRentalPropertyIndicator="N"/>  <LIABILITY _ID="Liab2" BorrowerID="Borr250612677" _AccountIdentifier="291443C81189" _ExclusionIndicator="N" _HolderName="HILLSIDE BANK" _MonthlyPaymentAmount="425.00" _PayoffStatusIndicator="N" _RemainingTermMonths="35" _Type="Installment" _UnpaidBalanceAmount="14748.00" SubjectLoanResubordinationIndicator="N" FNMSubjectPropertyIndicator="N" FNMRentalPropertyIndicator="N"/>  <LOAN_PRODUCT_DATA>  <LOAN_FEATURES BalloonIndicator="N" EscrowWaiverIndicator="N" GSEProjectClassificationType="GNotInaProjectOrDevelopment" GSEPropertyType="2Unit" LienPriorityType="FirstLien" LoanRepaymentType="NoNegativeAmortization" PaymentFrequencyType="Monthly" ProductName="15YRFixed"/>  </LOAN_PRODUCT_DATA>  <LOAN_PURPOSE GSETitleMannerHeldDescription="Sole Owner" _Type="Purchase" PropertyRightsType="FeeSimple" PropertyUsageType="Investment">  <CONSTRUCTION_REFINANCE_DATA RefinanceImprovementsType="Unknown"/>  </LOAN_PURPOSE>  <LOAN_QUALIFICATION AdditionalBorrowerAssetsNotConsideredIndicator="N" AdditionalBorrowerAssetsConsideredIndicator="N"/>  <MORTGAGE_TERMS BaseLoanAmount="120000.00" LenderCaseIdentifier="DI-C01" LoanAmortizationTermMonths="180" LoanAmortizationType="Fixed" MortgageType="Conventional" RequestedInterestRatePercent="3.250"/>  <PROPERTY _StreetAddress="160 N Gulph Rd" _City="Orlando" _State="PA" _PostalCode="190400001" _FinancedNumberOfUnits="2" _StructureBuiltYear="1965">  <_LEGAL_DESCRIPTION _TextDescription="Lot 37, Block G, Hardwood Estates" _Type="Other"/>  <PARSED_STREET_ADDRESS _HouseNumber="160" _StreetName="N Gulph Rd"/>  <_VALUATION _MethodType="FNM1004">  <APPRAISER _Name="Sam Appraiser" _CompanyName="Appraisers Inc" _LicenseIdentifier="123456789111111" _LicenseState="DC" _SupervisoryAppraiserLicenseNumber="123456789abcdefghijkl"/>  </_VALUATION>  </PROPERTY>  <PROPOSED_HOUSING_EXPENSE HousingExpenseType="FirstMortgagePrincipalAndInterest" _PaymentAmount="1475.82"/>  <PROPOSED_HOUSING_EXPENSE HousingExpenseType="HazardInsurance" _PaymentAmount="75.00"/>  <PROPOSED_HOUSING_EXPENSE HousingExpenseType="RealEstateTax" _PaymentAmount="165.00"/>  <PROPOSED_HOUSING_EXPENSE HousingExpenseType="MI" _PaymentAmount="50.00"/>  <PROPOSED_HOUSING_EXPENSE HousingExpenseType="HomeownersAssociationDuesAndCondominiumFees" _PaymentAmount="365.00"/>  <PROPOSED_HOUSING_EXPENSE HousingExpenseType="OtherHousingExpense" _PaymentAmount="100.00"/>  <TITLE_HOLDER _Name="Jimmy Johns"/>  <TRANSACTION_DETAIL AlterationsImprovementsAndRepairsAmount="0.00" BorrowerPaidDiscountPointsTotalAmount="0.00" EstimatedClosingCostsAmount="6000.00" MIAndFundingFeeFinancedAmount="0.00" MIAndFundingFeeTotalAmount="0.00" PrepaidItemsEstimatedAmount="2750.00" PurchasePriceAmount="340000.00" RefinanceIncludingDebtsToBePaidOffAmount="0.00" SellerPaidClosingCostsAmount="4750.00" SubordinateLienAmount="0.00" FNMCostOfLandAcquiredSeparatelyAmount="0.00">  <PURCHASE_CREDIT _Amount="10000.00" _Type="EarnestMoney"/>  <PURCHASE_CREDIT _Amount="1000.00" _SourceType="Lender"/>  <PURCHASE_CREDIT _Amount="4200.00" _Type="LeasePurchaseFund"/>  </TRANSACTION_DETAIL>  <BORROWER BorrowerID="Borr250612677" _FirstName="Jimmy" _MiddleName="N" _LastName="Johns" _NameSuffix="JR" _AgeAtApplicationYears="48" _ApplicationSignedDate="20080312" _BirthDate="19610923" _HomeTelephoneNumber="4078517234" _PrintPositionType="Borrower" _SSN="250612677" DependentCount="0" JointAssetLiabilityReportingType="NotJointly" MaritalStatusType="Unmarried" SchoolingYears="18">  <_MAIL_TO _StreetAddress="160 N Gulph Rd" _City="Orlando" _State="PA" _PostalCode="190400001" _Country="USA"/>  <_RESIDENCE _StreetAddress="160 N Gulph Rd" _City="Orlando" _State="PA" _PostalCode="190400001" BorrowerResidencyBasisType="Rent" BorrowerResidencyDurationMonths="7" BorrowerResidencyDurationYears="3" BorrowerResidencyType="Current"/>  <_RESIDENCE _StreetAddress="1234 Any Pl" _City="Washington" _State="DC" _PostalCode="200162222" BorrowerResidencyBasisType="Rent" BorrowerResidencyDurationMonths="3" BorrowerResidencyDurationYears="2" BorrowerResidencyType="Prior"/>  <CURRENT_INCOME IncomeType="Base" _MonthlyTotalAmount="3850.00"/>  <CURRENT_INCOME IncomeType="Overtime" _MonthlyTotalAmount="1000.00"/>  <CURRENT_INCOME IncomeType="Bonus" _MonthlyTotalAmount="400.00"/>  <CURRENT_INCOME IncomeType="AutomobileExpenseAccount" _MonthlyTotalAmount="100.00"/>  <CURRENT_INCOME IncomeType="NotesReceivableInstallment" _MonthlyTotalAmount="250.00"/>  <DECLARATION AlimonyChildSupportObligationIndicator="N" BankruptcyIndicator="N" BorrowedDownPaymentIndicator="N" CitizenshipResidencyType="USCitizen" CoMakerEndorserOfNoteIndicator="N" HomeownerPastThreeYearsType="No" IntentToOccupyType="Yes" LoanForeclosureOrJudgementIndicator="N" OutstandingJudgementsIndicator="N" PartyToLawsuitIndicator="N" PresentlyDelinquentIndicator="N" PropertyForeclosedPastSevenYearsIndicator="N"/>  <EMPLOYER _Name="National Consulting" _StreetAddress="1236 Main St" _City="Orlando" _State="PA" _PostalCode="190400001" _TelephoneNumber="8183323332" CurrentEmploymentMonthsOnJob="5" CurrentEmploymentTimeInLineOfWorkYears="21" CurrentEmploymentYearsOnJob="15" EmploymentBorrowerSelfEmployedIndicator="N" EmploymentCurrentIndicator="Y" EmploymentPositionDescription="Consultant" EmploymentPrimaryIndicator="Y"/>  <GOVERNMENT_MONITORING GenderType="Male" RaceNationalOriginRefusalIndicator="N" HMDAEthnicityType="HispanicOrLatino">  <HMDA_RACE _Type="BlackOrAfricanAmerican"/>  </GOVERNMENT_MONITORING>  <PRESENT_HOUSING_EXPENSE HousingExpenseType="Rent" _PaymentAmount="3500.00"/>  <SUMMARY _Amount="1000.00" _AmountType="IPCsExcessFinancingConcessionsOrSalesConcessionsAmount"/>  <CONTACT_POINT _Type="Email" _Value="Jimmy.Johns@abc.com"/>  </BORROWER>  </LOAN_APPLICATION>    

No comments:

Post a Comment