Micro Focus QTP (UFT) Forums
How to compare the property value of a checkpoint to a parameter in datasheet - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to compare the property value of a checkpoint to a parameter in datasheet (/Thread-How-to-compare-the-property-value-of-a-checkpoint-to-a-parameter-in-datasheet)



How to compare the property value of a checkpoint to a parameter in datasheet - vivekmenon - 12-04-2010

Note:I am new to QTP and there is no one here to help me out.

Scenario
--------

I have a frame in which there are 5 radio button options. Based on the plan(corresponds to an emp id) in the local sheet, I have to choose a corresponding radio button.

Below is what I am trying to do. But I doo how to code for that.

Code:
Dim Plan_Sep

Plan_Sep = Set Datatable("Plan_Sep_Data", dtLocalSheet)

If Plan_Sep property set = 'V' then select Plan 55
Else If Plan_Sep property set = 'S' then select Plan 72

and so on

Please help
VM


RE: How to compare the property value of a checkpoint to a parameter in datasheet - rajeshwar - 12-04-2010

Hi Vivek,

Code would look like this.

Code:
Dim Plan_Sep
Plan_Sep = Datatable("Plan_Sep_Data", dtLocalSheet)
If  strcomp(Plan_Sep,"V",1) = 0 Then
     Browser(..).Page(..).Frame(..).WebRadioGroup(..).select "#0"
ElseIf strcomp(Plan_Sep,"S",1) = 0 Then
     Browser(..).Page(..).Frame(..).WebRadioGroup(..).select "#1"
so on....
End If