Posts: 21
Threads: 7
Joined: Feb 2011
Reputation:
0
02-28-2011, 09:32 PM
hi all
can anyone plz explaing how to automate below scenario
the websites which has all this articles let's say cooking recipes and home decorating tips etc
ex:homes and gardens /parents ....
for these kind of website how we can validate the articles without using Qtp tool checkpoints
why becoz,there are tons of articles if we create checkpoints for all of them the the run speed is really slow
thanks
priya
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
03-01-2011, 04:44 AM
Priya -
Articles? What kind of objects are those? Are those mere webelements whose text you intend to verify?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 21
Threads: 7
Joined: Feb 2011
Reputation:
0
03-02-2011, 11:17 PM
Thanks for the reply
I am not sure what kind of webelements they are they are but i will explain
if we click on one link like say icecream it will display the recipe for the ice cream
i want to check the text of that recipe without using chekpoint
My idea is to get the text by using getroproperty and then query the database were this recipe is stored and save that and compare both of them
but i am not sure how will that work
can u help me
thanks again
priya
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
03-03-2011, 07:02 AM
Priya -
Let me show you the way, you would need to walk through,
Two parts,
1. GUI - getroproperty should give you the text.store it in a variable say VarGui
2. DB - recordset of the executed query should give you the same text.
You will need to define a " connection string " in order to connect to db. Use the API adodb.connection and adodb.recordset. Granulaize your sql qury so that it would fetch only the text you are going to compare. Store it in a variable. Say VarDb
3. Once you have both the values stored it Should be a cakewalk. Compare both the string which would mean If VarGui=VarDb then pAss else fail. If there is discrepancy in string then use instr or strcmp.
Does it help?
3.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.