SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Jan 2001
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Right Click(multiple Pop up menus) In a Window.


    Hello Friends,
    If I want to use silk test to automate the test on right mouse click and a menu pops up
    in a Window.
    # How can I do it without providing the X and Y coordinates?
    # In my case trying the coordinates did not work..
    We are trying to automate a front end for Networking product. Which is Java based.
    Thanks once again...
    Regards
    Girija.

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    186
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Right Click(multiple Pop up menus) In a Window.

    Have you tried WindowName.Click(2) ? That works for me.
    Tom

  3. #3
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Right Click(multiple Pop up menus) In a Window.

    Popup Windows do not work in any tool, It's the Law of Windows I'm afraid. You can never verify what's inside them, you May be able to do click by locations, or even select by index in some cases, but you cannot do an intellegent click or select.

    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

  4. #4
    Guest

    Re: Right Click(multiple Pop up menus) In a Window.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Popup Windows do not work in any tool, It's the Law of Windows I'm afraid. You can never verify what's inside them, you May be able to do click by locations, or even select by index in some cases, but you cannot do an intellegent click or select.<HR></BLOCKQUOTE>

    While this may be true for Java based apps, it isn't for Win9x. Please refer to the code snippet at http://www.qaforums.com/boards/ubb/F...ML/000237.html for an example of how validation of a popup menu may be accomplished using Silk.

    I use variations of this example to validate popup menus in our applications, as well as popup menu items associated with icons in the system tray.

    ------------------
    Tony Mrozinski
    Sr. Software Test Automation Engineer
    Home Networking Operations
    Intel Corporation

    [This message has been edited by Tony Mrozinski (edited 03-05-2001).]

  5. #5
    Junior Member
    Join Date
    Apr 2001
    Location
    North Reading, Massachusetts USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Right Click(multiple Pop up menus) In a Window.

    The code snippet above did not work for me (we are using an automating an Applet), i was able to invoke the Popup list by writing a custom function and adding it to the class definition of my java Tree object. The snippet is as follows:

    [-] PopupInvoke (INTEGER x, INTEGER y)
    [ ] Menu
    ("{WindowTag(this)}/({x},{y})/$PopupMenu").GetContents ()

    Simply use a GetRect on teh selected Tree item to pass in the x,y coordinates. Once i got the popup menu to invoke i had no problem veriying the properties of the menu.

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

  6. #6
    Guest

    Re: Right Click(multiple Pop up menus) In a Window.

    The code snippet referenced is for popup menus in Win32 apps, and would not work for Java applets.

    ------------------
    Tony Mrozinski
    Sr. Software Test Automation Engineer
    Residential Access Division
    Intel Corporation

  7. #7
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Right Click(multiple Pop up menus) In a Window.

    Unfortunately, the x, y coordinates in the two methods provided in SilkTest for working with popup menus are not optional. It would have been nice if they were optional so that you can select an item anytime without worrying where it is currently in the popup menu listing (in case new items are added or old items deleted). Enhancement Request to Segue, I guess. So for now, you have to use these for both MenuSelect () and PopupSelect () methods.

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


    [This message has been edited by Gilbert (edited 05-23-2001).]

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

    Re: Right Click(multiple Pop up menus) In a Window.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Gilbert:
    Unfortunately, the x, y coordinates in the two methods provided in SilkTest for working with popup menus are not optional. It would have been nice if they were optional so that you can select an item anytime without worrying where it is currently in the popup menu listing (in case new items are added or old items deleted). Enhancement Request to Segue, I guess. So for now, you have to use these for both MenuSelect () and PopupSelect () methods.
    <HR></BLOCKQUOTE>

    The x,y coordinates are where SilkTest will right-click to invoke the popup menu in the first place. They are not the location of the menu item in the popup menu.

    ------------------
    Matt Gray
    Kofax Image Products
    Matt Gray

  9. #9
    Junior Member
    Join Date
    May 2001
    Location
    Portland, OR
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Right Click(multiple Pop up menus) In a Window.

    I'll explain the scenario that I'm dealing with and maybe it will help you also. One of the windows in my application has a tree and two tables. Also, the menus are different depending on what java control the mouse is over when I right click. I don't use the any x,y coordinates because my opinion is that it will make my code too prone to script failures. I use the click methods for each of the objects so that I know exactly which menu will appear and I can also determine it's context. Context meaning, if the table is populated I will get a different menu state than if it is not. Here are a couple of the methods that I use:
    JavaJFCTable.ClickCell (cCell, 2) - The 2 means use the right mouse button

    JavaJFCTreeView.PressItem (Item, 2)
    JavaJFCTreeView.ReleaseItem (Item, 2)

    Someone above mentioned using the Click() method which is inherited by all window objects. That works great and is simplier than using the methods stated here. However, using the above approach offers a finer level of precision in your selection if you need it.

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

 

 

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:21 PM.

Copyright BetaSoft Inc.