Micro Focus QTP (UFT) Forums

Full Version: How to compare the property value of a checkpoint to a parameter in datasheet
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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