Micro Focus QTP (UFT) Forums
Check points in QTP - 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: Check points in QTP (/Thread-Check-points-in-QTP)



Check points in QTP - janriis - 04-02-2009

Hi

I have 3 text boxes in my application:

1:amount
2Tongueercentage_of_amount
3. New_amount

Now i wish to make a check point in my script, that checks that:
New_amount = Percentage_of_amount*amount

is TRUE

How do i do that ?


RE: Check points in QTP - dvkbabu - 04-15-2009

Parameterize the New_Amount value with Environment option. See the script below

Code:
A = Browser("xxxxxx").Page("xxxxx").WebEdit("amount").GetROProperty("Value")
B = Browser("xxxxxx").Page("xxxxx").WebEdit("Percentage_of_amount").GetROProperty("Value")
Environment.Value("New_amount ") =  int(A) + Int(B)

Browser("xxxxxx").Page("xxxxx").WebEdit("New_amount").Set Environment.Value("New_amount")

Browser("xxxxxx").Page("xxxxx").WebEdit("New_amount").Check CheckPoint("New_amount")

But You need to do the following to Parameterize New_Amount

Go to the CheckPoint properties window for New_Amount checkpoint and select Value property - > Select Config Value Parameter -> Select the Option as Environment and enter name as it used in Script.

Thanks,
Vijay


RE: Check points in QTP - janriis - 04-15-2009

Thx Vijay, gives me something to work on.