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
Where we can use the synchronization?
wt is the use of multiple questions in QTP
How can you identify the browser and its information using the qtp script?
Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link
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
What are the recording modes in qtp?
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?
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
How to handle dynamic objects in quicktest professional?
hi guys, pls tell me for testing institution training hub, hitech city is best or not?
How may types of defects identify application or your currently working application?pls give me answer..
Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance
What is the synchronization point in qtp?
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..
How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?