Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
validate the articles without text/textarea checkpoint
#1
Not Solved
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
Reply
#2
Not Solved
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.
Reply
#3
Not Solved
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
Reply
#4
Not Solved
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.
Reply
#5
Not Solved Wink 
HI Priya,

After reading your post the understanding I have about the requirement is:
'There may be multiple links(Titles) on a page & you want to validate any particular title.'

As per my understanding, verification using checkpoint takes lesser time than using Database(Especially when verifying one record at a time).

Please let me know if I anything wrong in this....Smile

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to validate a format of an alphanumeric string PrateepKaraval 2 5,994 11-08-2014, 10:26 AM
Last Post: vinod123
  Read text from text file and save it into a variable in qtp arpan 3 12,974 06-19-2013, 08:34 PM
Last Post: arpan
  How to validate tool tip in a web page? qtplearner88 3 4,320 04-24-2013, 05:19 PM
Last Post: nucleation
  Need to compare two text files - ignoring some text nelly27281 2 4,584 09-09-2012, 12:09 PM
Last Post: freeboynil
Exclamation How to validate color of image object in a web page qtplearner88 9 9,244 06-14-2012, 06:34 PM
Last Post: Shridevi.Salagare

Forum Jump:


Users browsing this thread: 1 Guest(s)