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
You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?
what is the mail use of frame work(with detail). architecture for keyword driven frame work
Whats the realtime QTP testing process
distinguish between old version and new version QTP features.
How will you check that your test cases covered all the requirements?
If u r using library files (Instead of Check Points) , How do u do bitmap check ?
PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME
What are the different recording modes?
How does quicktest professional (qtp) identifies the object in the application?
What is object spy in quicktest professional?
How many types of recording modes in the qtp?
What are the features of quick test pro(qtp)?
How to capture a window in QTP?
in my application,validation message has in japanise language.how to validate this message is appears properly or not
Get the count of files of similar types from a folder.