Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can i check all the button that are enabled in a
widnows based application ? What script should i write for
this ?

Answer Posted / jay prakash

Try this... i am writing for "Flight Reservation" sample
application. You can coustomize for your own requirements.

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''SCRIPT STARTS HERE'''''''''''''''''''''''''

Dim i, j, iRes
j=0: iRes=1
Window("Flight Reservation").Activate
Set oDesc = Description.Create
oDesc("Class Name").value="WinButton"
Set oChild = Window("Flight Reservation").ChildObjects
(oDesc)
iCount = oChild.count

For i = 1 to iCount

strBtnStatus = Window("Flight
Reservation").WinButton("Class Name:=
WinButton", "index:="&j).GetROProperty("enabled")
j = j+1

If strBtnStatus="False" Then
iRes = 0
Exit For
End If

Next

If iRes=1 Then
MsgBox ("All buttons are enabled")
Else
MsgBox ("All buttons are not enabled")
End If

Set oDesc = Nothing
Set oChild = Nothing

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''SCRIPT ENDS HERE''''''''''''''''''''''''''''

Please let me know if it satisfies your requirement.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to prepared for first for the first interview?

2302


How do you perform Regreession Testing?

1960


How do you do batch testing in wr & is it possible to do in qtp, if so explain?

1093


What is the syntax for how to call one script from another?

1049


How to suppress warnings from the test results page?

1042


Shall we add Local Repository to shared object repository,if yes,how we add

7515


How is a Step generator used in UFT?

1209


Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.

3543


How you can find the absolute value of the number in qtp?

1001


Is it possible to change the values of analog recording?

1139


How to customize checkpoints with parameters?

3593


Define Environment Variable in UFT and its uses?

1082


With what extension you can save the list of tests in a file to run in test batch runner?

1018


Is it possible to call win runner script in qtp?

1079


How to replay a script in qtp?

1093