Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can i check all the buttons are enabled or not using programming ?
#2
Not Solved
Hi njnirmal,

Please check the below LOC. I have taken the Flight Reservation window.
'*******************************************************************
'*******************************************************************
Code:
Set chld=Description.Create
chld("micclass").value = "WinButton"
Set chldcln = Window("Flight Reservation").ChildObjects(chld)
msgbox chldcln.count
Flag = True
DisBut = 0
For num = 0 to chldcln.count-1
    'To highlight the button in the application
    chldcln(num).highlight
    If chldcln(num).GetRoProperty("enabled") <> True Then
        Flag = False
        DisBut = DisBut+1
    End If
Next
msgbox Flag
If Flag = True Then
    msgbox "All the Buttons in the window are enabled."
Else
    msgbox "In the Window" & "''" & DisBut & "'' buttons out of ''"& chldcln.count &"'' are disabled."
End If
'################
Object Release
'################
Set chld = Nothing
Set chldcln = Nothing
'*******************************************************************
'*******************************************************************

Please let me know if you need any more info.
Thanks,
SUpputuri
Reply


Messages In This Thread
RE: How can i check all the buttons are enabled or not using programming ? - by supputuri - 07-16-2009, 10:54 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT 12.52/VBScript] Test object exist, is visible and enabled before take an action sparkwanted 0 3,456 02-07-2017, 12:28 AM
Last Post: sparkwanted
  Identifying radio buttons with same html ID but dynamic webelement properties manishac 12 13,153 05-03-2012, 06:27 AM
Last Post: manishac
  QTP not identifying the TextArea and Buttons properly. vibhakhushi 0 2,259 02-22-2011, 11:32 PM
Last Post: vibhakhushi
Question How to check for a static text in a web page using desrciptive programming? jaykisan 4 5,490 12-03-2009, 10:13 AM
Last Post: Saket
  Button is not getting enabled estherindu 4 3,903 10-14-2009, 06:00 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)