I am stuck with a problem and I come to you in hope that somebody might be able to provide a hint (QTP 9.5).
I am trying to have a web page tested and part of it would be to verify if the links are the ones that should be. However, some of the links are dynamic and the last part is being generated with each session.
I insert a checkpoint and verify the Filter Link Check. I choose the link I care about and then, regardless on how I go about it (constant, parameter, table, environment and such) I don't manage to get it to work.
I would use GetROProperty on the link to retrieve the URL and store it in a variable.
Then I would use instr() to find out if that string contains what I expect it contain.
My If..Then statement uses Reporter.ReportEvent to report a pass if the instr() function found what I expect or a fail if it didn't find what I expect.
I store my expected values in the DataTable so I can edit them easily without having to edit the script itself.
In all, this takes just a little more time to create the script when I use these bits of custom code instead of checkpoints, but the ongoing maintenance is so much easier of the life of the project that I feel it is well worth it.
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"