SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Aug 1999
    Location
    Irvine, CA
    Posts
    157
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Picking nested MenuItems on PopupMenus

    Using the Pick method for nested menu items on popup menus produces invalid exception "control is not enabled". The menu items are always enabled. My AUT is win32 and developed in Visual C++. I am using SilkTest 5.0.3. I have implemented popup menu functionality in the way described by the SilkTest manual. Here is an example of my code:

    <code>
    [+] winclass MyRightClick : PopupMenu
    [ ] POINT Point
    [ ] tag "$PopupMenu/({Point.x}, {Point.y})"
    [-] MenuItem Properties
    [ ] tag "$55043"
    [-] Menu Zoom
    [ ] tag "#8"
    [-] MenuItem N100
    [ ] tag "$54035"
    [-] MenuItem N50
    [ ] tag "$54037"
    [-] MenuItem Custom
    [ ] tag "$54038"

    [-] window MainWin MyMain
    [ ] MyRightClick RightClick

    [+] main()
    [ ] MyMain.RightClick.Point.x = 10
    [ ] MyMain.RightClick.Point.y = 10
    [ ]
    [ ] MyMain.RightClick.Properties.Pick()
    [ ] Properties.Close()
    [ ]
    [ ] MyMain.RightClick.Zoom.Custom.Pick()

    </code>

    In this code example, the "Properties" menu item can be successfully picked. The problem is with the "Zoom|Custom" menu item. It can't be picked.

    The strange thing is that SilkTest can "see" the Custom menu item and verify its properties. It just can't be picked.

    Any suggestions on how to get this working?

    [This message has been edited by MattGray (edited 02-22-2001).]
    Matt Gray

  2. #2
    Member
    Join Date
    Nov 2000
    Location
    Newport News, VA U.S.
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Picking nested MenuItems on PopupMenus

    Shouldn't the assignemnt be like the below?

    MyMain.RightClick.Point.x = 10
    MyMain.RightClick.Point.y = 10

    I'm not sure if this would fix your problem.

  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    Irvine, CA
    Posts
    157
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Picking nested MenuItems on PopupMenus

    Yes, it should be, and it is that way in my real code. I made a typo entering the code for this post.
    Matt Gray

 

 

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 02:17 AM.

Copyright BetaSoft Inc.