How can i check all the button that are enabled in a
widnows based application ? What script should i write for
this ?
Answer / 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 |
How can we log a defect in Testdirector from Q.T.P ?
how can we perform web datatable operations on webpages(Like rowcount,col count,cell data)?
How do you handle XML exceptions in QTP (Here it is Exception, not the checkpoint)
give one example where you have used regular expression?
how to create external data table?
what is a active x control?can any one brief me about active x controls
write vbscript in qtp tool for senario, in the given sheet add each number in each row and each colunm and show result
How can we merge two repositories? Can we merge two differnt rep. I mean 1is peraction and other shared
4 Answers Tavant Technologies,
can we create recorset with out using database connection in vbscript?
How does QTP identifies the object in the application
why use Description programming? what is advantages and disadvantage of this methods?
how can i change the action path that called in other action. when i copy one action to other pc,the action"test2" calls another action(C:\test1\action0),and i update this"test1",the folder update to "action1",but when i open "test2", it just point the call path to "C:\test1 \action0", but does not update to "action1",and the change i make can be shown in test2. so, can i update the call path manully? thanks