Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I left click on the right click menu in WinTreeView?
#1
Not Solved
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:

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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
MyBB how can i automatically click ok button in msgbox popup test 11 24,859 07-12-2022, 11:50 PM
Last Post: akash warke
  no action on click for particular wpf button jlavrecka 1 1,417 05-21-2020, 11:33 PM
Last Post: jlavrecka
  Click after CheckProperty to a WebElement passed via Function argument fails naruoga 0 1,154 02-28-2019, 11:46 AM
Last Post: naruoga
  Help for instruction to click on Skip button in the warning message vijilesh 0 1,504 09-16-2018, 03:48 PM
Last Post: vijilesh
  Unable to click on dynamically changing webelement preeti 0 1,807 04-29-2017, 08:50 PM
Last Post: preeti

Forum Jump:


Users browsing this thread: 1 Guest(s)