Micro Focus QTP (UFT) Forums
validate the articles without text/textarea checkpoint - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: validate the articles without text/textarea checkpoint (/Thread-validate-the-articles-without-text-textarea-checkpoint)



validate the articles without text/textarea checkpoint - priya999 - 02-28-2011

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


RE: validate the articles without text/textarea checkpoint - basanth27 - 03-01-2011

Priya -
Articles? What kind of objects are those? Are those mere webelements whose text you intend to verify?


RE: validate the articles without text/textarea checkpoint - priya999 - 03-02-2011

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


RE: validate the articles without text/textarea checkpoint - basanth27 - 03-03-2011

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.


RE: validate the articles without text/textarea checkpoint - A.Saini - 03-03-2011

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