SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Jun 2002
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem trying to use JavaJFCPopupMenu


    I am writing testcases to test a java application.

    I am running into a problem with using a popup menu. This menu appears
    when an item in a JavaJFCTreeView is selected and right mouse is clicked
    in the pane containing the tree view. One of the menu items in the popup
    will allow user to make changes to the tree Node that is currently selected.
    A JavaJFCTextField will appear in the current selected node position and the
    node label can now be changed.

    I first tried using PopupSelect(). This does not work.

    so then I tried something like:

    [ ] treeView.Click (2,1,1)
    [ ] list of window popupMenuItemList = mainwindow.JavaJFCPopupMenu("#1").getChildren ()
    [ ] window w
    [-] for each w in popupMenuItemList
    [-] if ( MatchStr ("*whateverIamLookingFor*", w.getCaption () ) )
    [ ] w.Pick ()
    [ ] break


    This works exactly like I want. However, the node does not become editable. But
    whenever, I repeat the same steps manually, the node becomes editable. How come ?
    What am I missing ? Is there any Agent option that needs to be turned/on off. This
    is driving me crazy.




    ------------------

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem trying to use JavaJFCPopupMenu

    1. Does the text field appear after the pick?

    2. Try comparing the code resulting from a record/actions with your example. Anything different?

    3. Run your code in debug mode. Does the pick actually occur?


    John


    ------------------

  3. #3
    Junior Member
    Join Date
    Jun 2002
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem trying to use JavaJFCPopupMenu

    Hi John:

    >>1. Does the text field appear after the pick?
    No.
    2. Try comparing the code resulting from a record/actions with your example. Anything different?
    >>No
    3. Run your code in debug mode. Does the pick actually occur?
    >> yes.


    ------------------

  4. #4
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem trying to use JavaJFCPopupMenu

    Try inserting a Sleep(.25) after the initial click to give the application time to paint the popup.

    John


    ------------------

  5. #5
    Junior Member
    Join Date
    Jun 2002
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem trying to use JavaJFCPopupMenu

    A sleep(.25 ) or sleep (1) after popup
    did not work.

    ------------------

  6. #6
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem trying to use JavaJFCPopupMenu

    This will fix it. Change this:

    JavaJFCPopupMenu("#1")...

    To:

    JavaJFCPopupMenu("JPopupMenu")...

    The reason the former doesn't work is because Silk interprets the #1 (despite the explicit class designation) to be the main application menu.

    Try this code block with a Popup open and you'll see the difference:

    I realized this after I checked the popup tag by printing mainwindow.GetChildren() with a popup open.

    John


    ------------------


    [This message has been edited by John J. Miller (edited 08-28-2002).]

    [This message has been edited by John J. Miller (edited 08-28-2002).]

  7. #7
    Junior Member
    Join Date
    Jun 2002
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem trying to use JavaJFCPopupMenu


    Changing
    JavaJFCPopupMenu("#1")...
    To:
    JavaJFCPopupMenu("JPopupMenu")...

    did not help. Thanks for all your comments.
    I am leaving this problem unsolved for now.
    The default name given to the folder is
    now "Untitled xxx". I will try to live with
    that.



    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 05:47 PM.

Copyright BetaSoft Inc.