Nexial Automation

Test Automation Platform for everyone!

X

pdf » assertFormValues(var,name,expectedValues,exactOrder)

Description

This command asserts the array of values in the form are present and in the same order as expected.

This assumes that the underlying pdf has a form, which is to be parsed via saveFormValues(pdf,var,pageAndLineStartEnd,strategy). Consult the PDF Form Data Extraction for more details.

This is the general approach:

  1. Make sure the target PDF exists via io » assertReadableFile(file,minByte)
    • not entirely necessary, but would be easier for root cause analysis.
  2. Make sure the target PDF contains key phrases, so as to affirm its validity.
    • again, not necessary but simplifies root cause analysis.
  3. Parse and save the PDF form via saveFormValues(pdf,var,pageAndLineStartEnd,strategy)
  4. Perform form-level validation via one or more of the following commands:

Parameters

  • var - the variable that stores previously parsed PDF form data
  • name - the name of the form element to validate
  • expectedValues - expected values
  • exactOrder - true if the referenced form values should match the exact order of expectedValues.

See Also