I have a test that runs through an insurance quote web site with. There are two test iterations. I've parameterised one screen input with two variables in the data table. On the second iteration I'm getting an error because the second variable changes the insurance answer after the calculation and the test does not recognise the second answer. There are two text checkpoints. The second one fails. I've tried using an output values but it did not work. See the attachment. The web site is Can anyone help?
Saket,
I have attached the screen prints. The test is to record entering variables into an insurance quotation website www.hibernian.ie\online (car insurance) then get an answer. Add a check point on the quotation answer and parameterise one of the variables and run two iterations. The second iteration fails because the second variable in the data table changes quotation answer. If you could suggest a better way to do the test that is great. I have'nt run any tests yet that involve writing Visual Basic script but I do have some knowledge of VB.
I did not find any issue , may be you can try using getroproperty to get the amount or else paste your lines of code from expert view. I would like to have a look on that.
I did not find any issue , may be you can try using getroproperty to get the amount or else paste your lines of code from expert view. I would like to have a look on that.
[/quote]
Saket,
This is the code. I have made a space where the error occurs.
This is because in the second iteration QTP does find a link with the text as in the OR.
try regularising the text of Link in your repository. May be something like ".*Just" will do.
let me know the out come.
also, always put your code in proper tags that makes the post much readable.
I am not able to go to the required page on your application today ( web page can not display the page ), so not able to do much with your code.
Saket,
I am only a beginner with QTP. Some of your answer I don't understand.
Maybe you could give an example of "*just" and "regularising the text of Link in your repository", also using tags (I could not use any of this web sites formatting icons such as Bold, clicking the icon enters [B] into the message.
The web site address iI am performing the test on is http://www.hibernian.ie/online/ then choose car insurance.
Thank you for spending your time.
What he means by "regularizing" is using Regular expressions.
You link object problably has a text value of "€868.54€910.13€41.59Just".
You can change the text value to a regular expression in the OR properties area to ".*Just" which means "any text that ends with Just". Double click the text property of your object to set it to a regular expression and the value.
That way if the link is dynamically changing during your testing it will still be properly identified.
Thanks for your help but the problem remains. I change the OR text description to .*Just and the object name to just but I'm still getting an error when the second iteration executes the second insurance quotation. I have attached some screen prints. Can you help?
Thank you
Search this forum or in QTP help to know how to make regualr expression in OR.
You will need to regularise the Text property of link.
Some thing like in attached snapshot will help.