SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jul 2000
    Location
    Chicago
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    SILKTEST 5.3.1.1- Javascript popup menu problem!

    I am trying to automate the selection of an item from a popup menu which appears on clicking an image. I tried the "menuselect ( )", but the problem is, on play back, it does not select the right item consistently.

    It is a graphical control, and it is evenly sized and spaced except for the last one which is bigger. So it does not work when I tried using the "(column:total-columns, row:total-rows)"; Also, I don't want to use the co-ordinates for all the known reasons and also that the popup menu items are different for different function icons. The problem is on both IE and Netscape.

    Can you think of any workarounds? Any suggestion is welcome.

    - Samy

  2. #2
    Junior Member
    Join Date
    Dec 1999
    Location
    San Mateo, CA, USA
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SILKTEST 5.3.1.1- Javascript popup menu problem!

    Samy,

    I have had similar problems with listbox selections that trigger Javascript. My workaround for that was to simply repeat the Select call (it always selected the correct one the second time around on my objects).

    The validity of this solution is completely based on what your Javascript is doing, so it may not work, but you might try it anyway.
    Craig Koozer
    Lead Test Automation Engineer
    www.oraclesmallbusiness.com

  3. #3
    Junior Member
    Join Date
    Jul 2000
    Location
    Chicago
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SILKTEST 5.3.1.1- Javascript popup menu problem!

    Craig, how do you select the second time? In my case, once i select a particular item from the PopupMenu, depending on what i selected, the browser gets redirected to a different URL. Maybe the attached image might help you to help me!

    As it is a graphical control, the items are recognized as #1, #2,etc. On IE, i used TypeKeys to select the menuitem; but on Netscape, even WITHOUT SilkTest, Keyboard is not an option, so i am dead!

    [This message has been edited by Samy (edited 07-19-2000).]

    [This message has been edited by Samy (edited 07-19-2000).]

  4. #4
    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: SILKTEST 5.3.1.1- Javascript popup menu problem!

    Does the popup respond consistently to keystrokes? If it does, you can create a series of enums to pass to a function which sends the correct number of <Down> arrows, then <Enter>

    For example:

    type PopupItem is enum
    PMCut
    PMCopy
    PMNewWindow
    PMHelp

    SelectPopupMenu (WINDOW wObject, PopupItem piMenuItem)

    wObject.Click (2)
    // TO CLICK THE RIGHT MOUSE

    for i = 1 to piMenuItem
    wDialog.TypeKeys ("<Down>")

    wDialog.TypeKeys ("<Enter>")

    Using an enum instead of an integer means that you can easily update the popup menu contents if they change and your scripts will be more readable than using integers.


    Hope this helps


    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

  5. #5
    Junior Member
    Join Date
    Jul 2000
    Location
    Chicago
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SILKTEST 5.3.1.1- Javascript popup menu problem!

    John, sorry about this confusion, but can you look at the topic "record window identifiers - in a script?"

    Also, if possible, i would like to merge this topic with "record window identifiers - in a script?". As the same experts are helping me, that should work out fine.

    Thanks guys!

  6. #6
    Junior Member
    Join Date
    Jul 2000
    Location
    Chicago
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SILKTEST 5.3.1.1- Javascript popup menu problem!

    Can close this topic!!! I found a workaround that solved my problem.

    I extended the AnyWin class and added new methods for MenuSelect () and PopupSelect (); In the PopupSelect, i replaced this line,

    MenuItem ("{WindowTag(this)}/({x},{y})/$PopupMenu/{sItem}").Pick ()

    with these two lines

    Browser.Click (1, x, y)
    MenuItem ("{WindowTag(this)}/({x},{y})/$PopupStart/{sItem}").Pick ()

    Now things are working fine on 95/98/NT. I should be able to get it working on Win2000
    soon!

    When you are against a wall, you always find a way out!!!!

    Thank you guys!

 

 

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.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:02 AM.

Copyright BetaSoft Inc.