Get child objects nested within multiple tables
A colleague of mine has a problem but I have no solution for it. Has anyone created a function that given an object will get only the direct children objects? The script below is close but it returns all children objects versus just the direct children. (So if you had a table with 2 tables nested and each of those 2 had 3 tables, I want just the 2 tables nested under the first table, but the script below gives you all 8 tables). Does the code need modifying in the 'childobjects' statement or maybe in the 'get.roproperty' statement. thanks in advance.
Dim objDescription, objects, numTables, obj
Set objDescription = Description.Create()
objDescription("html tag").Value = "DIV"
Set objects= Browser("0702136243, LSEIGhidd,").Page("0702136243, LSEIGhidd,").Frame("left").WebTable("Loan 0702136243").ChildObjects(objDescription)
numTables = objects.Count
msgbox "Num of children tables " &numTables
For i = 0 to 10
Re: Get child objects nested within multiple table
If its multiple tables one inside the other i.e. nested then the child tables should have been inside one of the cells of the parent which is generally the case. Check if its the same for you..If it is then use Childitem instead of Childobjects and see if it helps
Re: Get child objects nested within multiple tables
Why don't you directly retrieve 2 different collections from both tables instead? You can then combine the 2 collections into an array or a dictionary..