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
how to prepared for first for the first interview?
How do you perform Regreession Testing?
How do you do batch testing in wr & is it possible to do in qtp, if so explain?
What is the syntax for how to call one script from another?
How to suppress warnings from the test results page?
Shall we add Local Repository to shared object repository,if yes,how we add
How is a Step generator used in UFT?
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.
How you can find the absolute value of the number in qtp?
Is it possible to change the values of analog recording?
How to customize checkpoints with parameters?
Define Environment Variable in UFT and its uses?
With what extension you can save the list of tests in a file to run in test batch runner?
Is it possible to call win runner script in qtp?
How to replay a script in qtp?