0

I have a sample PDF & there is one field with Account Number. I want this Account Number to be validated. I have added a file checkpoint with Environment Variable. I come to know the Account Number of new PDF at run time so i I have passed Account Number to the Environment Variable at run time. At the place of Account Number (Checkpoint) in the OR, i have parameterized it as Environment("AccNumber"). Below is the code where i assign account number in env variable.

Environment("AccNumber") = strAccNumber 

After which my checkpoint step is present. I have checked that strAccNumber as well as Environment variable gets assigned correct account number. Checkpoint fails & in the result at account number line it gives :

Expected : Environment("AccNumber")
Actual : 756325

In place of Environment("AccNumber"), account number should come. Can someone please help

Note : I am using HP UFT 12.51

ManishChristian
  • 3,759
  • 3
  • 22
  • 50
pranav012
  • 27
  • 6
  • Can you show how you have passed the value to the `Environment` variable? As that will be where the issue lies. – Dave May 28 '16 at 16:18

1 Answers1

0

Ideally this should work. But you haven't mentioned how you read and write to environment variables in the script.

If the environment variable "AccNumber" is not registered properly during runtime, it will return null string and NOT the string name itself.

Please share the piece of code you have written to read/write the environment variable.