SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Member
    Join Date
    Mar 2005
    Location
    Midwest
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    property check popup menu

    Is there a way to do a property check on a popup menu? When applying the traditional technique (CTL/ALT) the popup menu closes and Silk throws an error message.

    Thoughts??

  2. #2
    Member
    Join Date
    Jun 2004
    Location
    fairfax
    Posts
    42
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: property check popup menu

    Did u check SetTrap ?
    Bit-Brains

  3. #3
    Member
    Join Date
    Mar 2005
    Location
    Midwest
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: property check popup menu

    Ok...from what I see in Silk documentation....set trap simply tells me that a window has come into existence. This does not enable me to capture the properties, correct?

  4. #4
    Advanced Member
    Join Date
    Oct 1999
    Location
    Chicago, IL
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: property check popup menu

    Not sure what you mean by "property check". Like is a menu item enabled or checked? If so, yes, that can be done. For example:

    SomeWindow.popMenu.miCopy.IsEnabled()

    ...returns true when the item (miCopy) on the popup menu (popMenu) is enabled.

  5. #5
    Member
    Join Date
    Mar 2005
    Location
    Midwest
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: property check popup menu

    "property check" referring to the presence of certain items and whether or not they are enabled.

    thanks

  6. #6
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: property check popup menu

    wPopup.GetContents () will return the items in the list.

  7. #7
    Senior Member
    Join Date
    Jul 2002
    Location
    delhi
    Posts
    184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: property check popup menu

    If you are referring about popup menu that is not implemented as a distinct window and that appears on right clicking the mouse at a certain location within a window, you can not check whether a menu item is enabled/disabled in traditional way.

    The work around you can apply is that select that menu item using PopupSelect () / MenuSelect (). If any exception is thrown, it is disabled/absent otherwise the relevant action takes place.

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">do
    MainWin.PopupSelect (20, 30, &quot;MyListItem&quot
    Do the necessary actions/Close the GUI invoked
    except
    LogError (“Disabled/Absent”)</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">

  8. #8
    Advanced Member
    Join Date
    Oct 1999
    Location
    Chicago, IL
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: property check popup menu

    Originally posted by Masiha:
    [QB] If you are referring about popup menu that is not implemented as a distinct window and that appears on right clicking the mouse at a certain location within a window, you can not check whether a menu item is enabled/disabled in traditional way.
    <font size="2" face="Verdana, Arial, Helvetica">I'm not sure what you mean by "implemented as a distinct window", but we verify items on right-click popup menus throughout our MFC application all the time using methods like IsEnabled, IsChecked, etc. And like John pointed out, we have also used GetContents() against the actual right-click popupMenu itself to get a list of the items on the popup.

  9. #9
    Senior Member
    Join Date
    Jul 2002
    Location
    delhi
    Posts
    184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: property check popup menu

    Brian, what you are telling is perfect....

    Open a notepad, do record window declaration, right click on notepad and try to record the declaration of the popup menu...Silk takes it as dialog box only and no menu item is recorded...

    For java application, Silk records every menu items in the popup menu after right click [My experience]

    There are certain cases where Silk doesn't recognize the popup menu at all even as custom window...It happened to me when I was working on automation of an XML editor where the text content pane was not recognized by SilkTest.....


    For more information, See help for "PopupSelect method"....

  10. #10
    Advanced Member
    Join Date
    Oct 1999
    Location
    Chicago, IL
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: property check popup menu

    I personally have never had Silk record a right-click popup menu definition. I have always coded it by hand. In fact, I believe that is what Segue recommends, is to make your own PopupMenu classes. So there are cases where recording is simply not possible and you have to do some coding "by hand" instead.

    As for the Notepad example, in the Silktest help, under 'PopupMenu class' they give the exact example of accessing right-click items off of the menu. Although, in the SilkTest 7.5 help file, the formatting for this particular example is off somewhat and requires some "Move Lefts" to get it to work after pasting into the editor.

    While I think their implementation is somewhat goofy in regards to these popup menus, once setup, it works out nicely. And like Masiha mentions, there are always going to be cases where Silk won't recognize objects. I would hope though, that if the "PopupSelect" method can choose the item, coding the popup menu by hand should work as well, and possibly give you access to other handy methods like IsEnabled and IsChecked.

 

 
Page 1 of 2 12 LastLast

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 9.38%
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 05:43 AM.

Copyright BetaSoft Inc.