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
What are the factors on which script execution time is dependent?
Is it possible to split an action? How?
what are the frame work models of qtp?which frame work you follow in your company?and explain it process?
How do you send email with attachment from outlook using qtp ?
I have qtp 9.5 demo ver,I am not able to record the yahoo broeser.so anyone can tell me what setting i have to do in QTP for yahoo brower recording. why its not recognise the object of yahoo browser????
What is use of object spy?
How is test case write?
While spliting an action in QTP 10.0 getting an error : "This Line is a part of Script Block.You cannot split the action on this line." how to re-solve this and split the script into actions?
i have a doubt can anyone tell me where are scripts stored while using QTP.Tell me the exact procedure takes place in real time?like how we call scripts how to proceed after writing scripts?how scripts are executed etc?i heard some use Qc whether others dont use.so tell me whole procedure for both the things it will be a very big help.as i have interview i want to have whole idea on this.its very urgent.
What are the Disadvantages of shared object repository?
How many types of recording modes in qtp? Which will be used when?
Why is Client side image is preferred over server side image?
Explain about the test fusion report of quicktest professional (qtp)?
hi can any body give me a script for creating a modularity or keyword driven framework..i am working as a qtp tester for 2 months but still i am not exposed to framework in my company
what is the difference btn risks & Therads in the Test plan documentation?