WORKING WITH QTP

TestEveryThinG

Select Radio Button QTP

Posted by rajivkumarnandvani on April 29, 2009

Rem**************************************************************************************


Rem This function select the radio button with specified number of index
REM  Input objRadiobutton:= radiobutton object intenetexplorer exe || nIndex:= number of specifed radio button which need to be   rem select
REM  Output(ReturnType) := None
REM  Created:    07/April/2009    Rajiv Kumar Nandvani  ##
REM Changed:MM/DD/YYYY

REM***************************************************************************

Public Function fn_RadioButtonSelect( byref  objRadiobutton,byval nIndex)

sItems= objRadiobutton.GetROProperty(“all items”)
sItems=split(sItems,”;”)
nIndex =nIndex-1

If  nIndex =< (ubound(sItems) ) Then
objRadiobutton.select sItems(nIndex)
else
Print  “Please check  number of radio button”

End If

Rem  Clear All  the Refrences to the Objects
Set objRadiobutton =nothing
End Function

Advertisements

One Response to “Select Radio Button QTP”

  1. Anonymous said

    hi
    am facing the below prob we using all items property

    radio group has 2 radio buttons but the allitems property return 4 values seperated with ;
    hw can we resolve this

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: