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 ?
#3
Not Solved
Hi Guys,

The below script would also get you the result, but may not be compatible with all windows application as Iam filtering with the 'value' of Windows Style (which would vary from application to application"). Anyhow here it is............

=======================================
Code:
SystemUtil.Run "calc","","C:\Documents and Settings\Administrator",""

Set obj_AllButtonDesc = Description.Create
obj_AllButtonDesc("Class Name").value = "WinButton"
Set AllButtons = Window("Calculator").ChildObjects(obj_AllButtonDesc)
msgbox AllButtons.count

Set obj_DisButtonDesc = Description.Create
obj_DisButtonDesc("windowstyle").value = "1476395019"
Set DisabledButtons = Window("Calculator").ChildObjects(obj_DisButtonDesc)

msgbox DisabledButtons.count

If  AllButtons.count = DisabledButtons.count Then
    Msgbox( "All the buttons in your application are  currently enabled")
    Else
    Msgbox( "Few buttons in your application are currently disabled")
End If
=======================================
Reply


Messages In This Thread
RE: How can i check all the buttons are enabled or not using programming ? - by QTPgrd - 07-16-2009, 03:22 PM

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,467 02-07-2017, 12:28 AM
Last Post: sparkwanted
  Identifying radio buttons with same html ID but dynamic webelement properties manishac 12 13,242 05-03-2012, 06:27 AM
Last Post: manishac
  QTP not identifying the TextArea and Buttons properly. vibhakhushi 0 2,262 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,530 12-03-2009, 10:13 AM
Last Post: Saket
  Button is not getting enabled estherindu 4 3,918 10-14-2009, 06:00 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)