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

What is QTP testing process?

1076


Mention the test steps of qtp.

999


Describe function procedure in vbscript.

1116


Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)

1899


what is test scheduleling?

2510


What is the difference between byref and byval in qtp?

1081


How smart identification works in qtp ?

984


How to create runtime property for an object?

1979


What will be happen if i load object repository at run time, but it has already associated.

1770


When using descriptive programming?

1077


Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?

2609


Explain the Different types of QTP test assets and their extensions?

1105


Explain the new feature of UFT regarding the export of test results?

1020


How to use Environment parameterization? Explain with an example.

1966


How will you find the current time of the remote machine using QTP script?

1056