The question is how to understand the structure of parent and child objects, because the spider.window and spider.gadget objects are parallel in spider (JavaScript) and are not nested. It's wrong to track this through the DOM because the spider object has a private structure.
How do I iterate over a tree of parent and child objects, similar to a structure:
Code: Select all
; Window1 ; - GetParent = Desktop
; Container1 ; - GetParent = Window1
; Gadget1 ; - GetParent = Container1
; Gadget2 ; - GetParent = Container1
; Container2 ; - GetParent = Window1
; Gadget3 ; - GetParent = Container2
; Panel1 ; - GetParent = Window1
; Gadget5
; Window2 - ; GetParent = Desktop
; Gadget6