Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to identify immediate parent in hierarchy
#1
Not Solved
Hi

I have a form hierarchy as follows:

1. SwfWindow("swftypename:=Hummingbird\.DM\.Extensions\.Forms\.LocationSave\.LocationSaveForm") =>
2. SwfObject("swfname:=profileTypeFormCompositeUserControl") =>
3. SwfObject("swfname:=panelControlProfileScroller") =>
4. SwfObject("swfname:=formInterpreterControl") =>
5. SwfObject("swfname:=DOCNAME") =>
6. SwfObject("swfname:=buttonEditCtl") =>
7. SwfObject("swfname:=SwfEdit") =>

The problem is that the form is so poorly designed, that the field name and the field contents are at two different levels in the hierarchy.

Level 5 contains the field name
Level 7 contains the actual field content.

What I am after is to identify the parent of the parent in the heirarchy. Now I have managed to use a series of nested childobject/FOR...NEXT loops to drill down to the item required, it would be better for my purposes to start at the bottom of the hierarchy and work upwards to the parent.

I've tried various variations on the code below, but the best I could get was the code recognising the parent as top level parent object and not recognising the intermediate objects.

Code:
Set descSwfEdit = Description.Create
descSwfEdit("micClass").Value = "SwfEdit"
Set colSwfEdit = SwfWindow("swftypename:=Hummingbird\.DM\.Extensions\.Forms\.LocationSave\.LocationSaveForm").SwfObject("swfname:=profileTypeFormCompositeUserControl").SwfObject("swfname:=panelControlProfileScroller").SwfObject("swfname:=formInterpreterControl").ChildObjects(descSwfEdit)
For k = 0 To colSwfEdit.Count - 1
    msgbox colSwfEdit.GetROProperty("micClass") & VBCR & colSwfEdit.GetROProperty("text")
Next 'k

Is it possible to tweak this to look at the immediate parent or am I stuck with having to use my long-winded iterative trek downwards through the various levels?

Thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to identify multilevel headers of JTable dharanikesav 0 1,469 01-16-2017, 07:09 PM
Last Post: dharanikesav
  QTP is not identifying Parent objects it self then how can we automate swapna.9n9 0 2,042 12-11-2014, 04:32 PM
Last Post: swapna.9n9
  Cannot find the "[ WebEdit ]" object's parent "[ Browser ]" (class Browser). Verify t Divya Roopa 1 8,528 03-11-2014, 12:13 PM
Last Post: devarapallliramana
  How to make a function for an object that has a large number of parent objects Shroomsday 1 2,414 01-28-2014, 11:15 PM
Last Post: jacosta
  Unable to identify unque properties of chrome browser tanyamrz 5 5,007 05-01-2013, 06:53 PM
Last Post: pradeep singh

Forum Jump:


Users browsing this thread: 1 Guest(s)