12-22-2012, 04:22 AM
Hi all,
I am trying to right click on a node in my WinTreeView, then Left click on the menu that pops up.
I can get the right-click menu to come up by doing this:
Now I have a menu coming off 'Qa Test node' as I wanted.
But how do I left click on that menu? When I left click while recording, QTP just ignores me....it does not make the selection, it does not create any code.
I have tried to do something like :
Then maybe I could do:
Hopefully you aren't laughing too hard right now.
Well that doesn't work because I can't figure out how ChildObjects works, and I'm not sure this is the right approach anyway.
Should I keep trying to figure out ChildObjects and do it as outlined above, or is there a better way to do this?
Obviously I am new at this, I have beat my head on this one a long time, and I would really appreciate any help.
If ChildObjects is the correct way to do it, then I will ask questions about how to make ChildObjects work...but first I want to know if there is a better approach.
Thanks,
Random
I am trying to right click on a node in my WinTreeView, then Left click on the menu that pops up.
I can get the right-click menu to come up by doing this:
Code:
Window("MyWindow").WinTreeView("trvTree").Select "Top Node Level;P-Q;Qa Test node", micRightBtn
Now I have a menu coming off 'Qa Test node' as I wanted.
But how do I left click on that menu? When I left click while recording, QTP just ignores me....it does not make the selection, it does not create any code.
I have tried to do something like :
Code:
set Obj = Window("MyWindow").WinTreeView("trvTree").ChildObjects("Top Node Level")
set obj2 =Obj.ChildObjects("P-Q")
set obj3 = obj2.ChildObjects("QA Test node")
Then maybe I could do:
Code:
set obj4=obj3.ChildObjects("That right menu that pops up") ' Somehow!!
obj4.Select "MyMenuChoice", micRightBtn
Hopefully you aren't laughing too hard right now.
Well that doesn't work because I can't figure out how ChildObjects works, and I'm not sure this is the right approach anyway.
Should I keep trying to figure out ChildObjects and do it as outlined above, or is there a better way to do this?
Obviously I am new at this, I have beat my head on this one a long time, and I would really appreciate any help.
If ChildObjects is the correct way to do it, then I will ask questions about how to make ChildObjects work...but first I want to know if there is a better approach.
Thanks,
Random