10-17-2013, 09:36 PM
Supputuri:
I assume you are asking how can you tell determine how may links are in a webtable.
I am not certain whose code I modified. Sorry.
hth,
Parke
I assume you are asking how can you tell determine how may links are in a webtable.
I am not certain whose code I modified. Sorry.
Code:
''// Find_all_childobjects_of_a_webtable
''// do not know how this code will react if a cell has more than one object
''// for example a cell contains webedit and a link
Function objects_count_in_Page(Req_obj)
Dim obj
Set obj=Description.Create
obj("micclass").Value=Req_obj
Set x=Browser("name:="&browserName).Page("title:="&browserName).WebTable("name:="& tableName).ChildObjects(obj)
Req_obj_count= x.count()
print Req_obj&"s"&" in WebPage : "&Req_obj_count
objects_count_in_Page = Req_obj_count
End Function
' If any web objects are missing, add them to the array
webObjects_arr = array("Link", "WebButton", "WebCheckBox", "WebEdit","WebElement", "WebTable", "Image", "WebList", "WebRadio", "WebRadioGroup")
' loop through the array to count how many of each type appears in the webtable
For i = 0 to ubound(webObjects_arr)
Call objects_count_in_Page(webObjects_arr(i))
Next
hth,
Parke