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
I used child objects to get the no of weblist present in the weblist.now i need to select the items present in each weblist ?How to do so
Explain process of smart Identification in QTP?
Explain in brief about the quicktest professional (qtp) automation object model?
What is the difference between qtp and selenium?
hi all here i have tab named "Workbench" By clicking on "workbench" tab.it displays 4 tabs like below workbench common cargo commercial charter "common" tab have 10tabs inside,"cargo" tab also haveing 15 tabs inside and remaining two tabs also having few tabs inside. when clicked on "common" tab.it displaying the script like tab("workbench").select"common" if i clicked on "cargo".it displaying the script like tab"workbench_2").select"cargo" if i clicked on "commercial".it displaying the script like tab"workbench_3").select"commercial" if i clicked on "charter".it displaying the script like tab"workbench_4").select"charter" I have used a "FOR LOOP" for common,commercial,cargo,charter tabs.it was stopped at second tab SO, CAN I RECOGNIZE "WORKBENCH_2,_3,_4" AS A SINGLE VARIABLE if not, can anyone plese help me to solve this
WAT IS DATA BASE AND XML CHECK POINT ?HOW TO IMPLEMENT IT ... GIVE PROPER EXAMPLE FOR IT
What are the different properties of an web object
Shall we add Local Repository to shared object repository,if yes,how we add
What is the Difference between test object and run time object?
Explain the concept of object repository & how qtp recognizes objects?
How to use Environment parameterization? Explain with an example.
Step 3&4 are repeated until an the object in recognised uniquely.
How to handle dynamic objects in quicktest professional (qtp)?
How to find the difference between 2 dates in qtp?
How to handle the exceptions using the recovery scenario manager in qtp?