How to find the number of WebButtons in a screen while runtime?

Questions by venkatesanj

Editorial / Best Answer

amereetto  

  • Member Since Jul-2007 | Mar 27th, 2011


Hi,


Below is the example to find the number of WebButtons in a page. I have have coded iot for Google page:

Dim oDesc 'Description Object
Dim colObject 'Object Collection

Set oDesc = Description.Create
oDesc( "micclass" ).value = "WebButton"
'Additional property- for more focused and controlled collection
oDesc( "Type" ).value = "submit"
Set colObject = Browser( "name:=Google").Page("title:=Google").ChildObjects( oDesc )
Msgbox colObject.Count 'Returns the number of webbutton

Thanks.
Debajit

Showing Answers 1 - 1 of 1 Answers

amereetto

  • Mar 27th, 2011
 

Hi,


Below is the example to find the number of WebButtons in a page. I have have coded iot for Google page:

Dim oDesc 'Description Object
Dim colObject 'Object Collection

Set oDesc = Description.Create
oDesc( "micclass" ).value = "WebButton"
'Additional property- for more focused and controlled collection
oDesc( "Type" ).value = "submit"
Set colObject = Browser( "name:=Google").Page("title:=Google").ChildObjects( oDesc )
Msgbox colObject.Count 'Returns the number of webbutton

Thanks.
Debajit

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions