Sam08 wrote:What do I do about valdating something that changes?
The situation I keep seeing is that the database the application
is interrogating produces data that depends on the current balance
in a customer's account.
How can eValid validate the result?
I know that if I can't predict the value, I can't validate it. But in this
case I can open another window and read out what the value
on my screen is supposed to be.
How do I handle that?
Let's try to divide that up a bit...
(1) If you know that the value you see on the page is correct, validating
it means confirming that it has not changed due to web application changes,
etc. In that case the regular "validation commands" in eValid do the job. That's a Green Screen.
(2) If the thing you are validating moves around -- that is, its location on the page changes between when you recorded the validation and when you are trying to validate it -- the Adaptive Playback feature probably will "do the right thing" for you...by finding the changed location automatically, and saying
OK. But eValid warns you about the action it had to take to achieve the validation. That's a Yellow Screen. Yellow screen is good, but maybe you ought to pay attention.
(3) If you know from "other sources" what the correct value is supposed to be, then what you do is change the expected value into a parameter, e.g. $EXPECTED, and then CallScript scrip.evs $EXPECTED=expected-value. In this case you'll validate it, but you may get Warnings (Yellow Screen).
(4) If the expecte value is on the screen, then you can find it with an IndexFind command, pick up the correct value from the screen, save it and compare THAT value with what you expect. Probably Green Screen here becuase you don't have Adaptive Playback running.
(5) If the value is in a different window, no problem; eValid will change the window identifier (e.g. from 0 to 1) and things will go as in (4).
(6) If none of the above works, well, maybe it can't be done? Or, you need the famous "mind reading" module that always guesses correctly? Only joking; of course that's impossible.
Hope this works out for you!
The eValid Support Crew