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 |
what all are the coverages , explain ?
I have a Webedit object. some text is entered in that object I want to know the font sixe of that text.How could I do this using QTP? This is a requirement for me. I am happy if any one help on this
in a web page How to check and display a particular word from a paragraph?
How to write business scripts using object repository with different scenarios
What are the challenges do we face while testing webbased applcations using the automation tool QTP or any?
what is the difference between an Action and a function in real time
how u write vb script in qtp pls give me some basic script and some material
32 Answers Datamatics, UHG, Winit,
How do you invoke any application and write a script to invoke QTP using VB Script.
What is the syntax to call one script from another?
1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?
How to use Regular Expressions in QTP
write script for finding number of broken links in web page? kindly please answer my question.
3 Answers Manhattan, Oracle, Virtusa,