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

Where we can use the synchronization?

955


wt is the use of multiple questions in QTP

2094


How can you identify the browser and its information using the qtp script?

949


Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link

1263


how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me

2874


What are the recording modes in qtp?

979


Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?

1030


how to find that a file has been completely downloaded or not? I told that "download Complete" pop up. but he told the tool doesn't recognize the pop up

4496


How to handle dynamic objects in quicktest professional?

892


hi guys, pls tell me for testing institution training hub, hitech city is best or not?

1772


How may types of defects identify application or your currently working application?pls give me answer..

1947


Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance

1861


What is the synchronization point in qtp?

942


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object..

2254


How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?

1204