SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Dec 2006
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Java Tree Node Right Click Popup menu not clicked

    Situation i have
    Java Tree in Java Applet in a web based app.
    Script recorded for
    - select node
    - right click - popup menu comes (java menu
    - select menu item from this popup menu

    Problem
    The script replay is not getting the popup menu object.
    Observed that during the script run, the right click on the node shows the menu and it disappers immediately and then the script gets stuck at the step where the menu item is clicked.

    Any workaround or why the popupmenu is disappearing immediately?

    Note: Tried adding wait after the right click to node, no luck!

    Thanks in advance.

  2. #2
    Advanced Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    817
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Java Tree Node Right Click Popup menu not clicked

    Try this... it is only an example, you'll have to play around with it..

    JTree.Select Node
    set selectionPath = JTree.Object.getSelectionPath()
    set rect = JTree.Object.getPathBounds(selectionPath)
    x = rect.x
    y = rect.y
    JTree.Click CStr(x), CStr(y), "RIGHT"
    End Function
    'Register function and call it
    RegisterUserFunc "JavaTree", "RightClick", "RightClick"
    JavaWindow("JTree Demo").JavaTree("JTree").RightClick
    "Books;Java Books"
    UnRegisterUserFunc "JavaTree", "RightClick"
    I like what i know and I know what i like

  3. #3
    Junior Member
    Join Date
    Dec 2006
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Java Tree Node Right Click Popup menu not clicked

    Already have implemented this function from mercury's KB site. The problem is, the popup is shown and it disappears immediately before the next step can select an item from that popup menu.
    Thanks Max,

  4. #4
    Senior Member
    Join Date
    Apr 2002
    Location
    South Africa
    Posts
    273
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Java Tree Node Right Click Popup menu not clicked

    Try the FireEvent function, something like the following:

    JavaWindow("JTree Demo").JavaTree("JTree").FireEvent micMousePress, 0, "BUTTON2_MASK", x, y, 1, "ON"

    where x and y are the coordinates for the click (earlier samples should work)

  5. #5
    Advanced Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    817
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Java Tree Node Right Click Popup menu not clicked

    Have you tried to 'restore' the pop up window, sometimes it is hidden in the background somewhere or does the popup window terminate?
    I like what i know and I know what i like

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:10 PM.

Copyright BetaSoft Inc.