SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Feb 2000
    Location
    Shrewsbury, MA
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trapping an unexpected window

    I am new to the Segue tool. In Visual Test there was a function
    "On WindowCreate(caption) ... call {mysub}" which was declared globally. Once set, any window that appeared with the supplied caption triggered the specified subroutine. In the sub, you could then trap the text (usually an error message) and decide how to proceed.
    This was nice because the error windows always had the same caption but could occur at any time throughout the test.

    Is there an equivalent in QAP/Silk?

  2. #2
    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: Trapping an unexpected window

    Declare the window then use the following method:

    WindowName.SetTrap ("Button caption to Click, ie. OK or Cancel etc.")


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

  3. #3
    Junior Member
    Join Date
    Apr 2000
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping an unexpected window

    HI,

    With SetTrap() method, won't it just respond to the window? How do I call a sub routine?


    Manisha Patel
    Princeton Softech Inc.


  4. #4
    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: Trapping an unexpected window

    If you need to do more than click a button when a window appears, you need to write your own : if wWindow.Exists () ... and you can call that in a function as well.

    Since SetTrap runs in a seperate thread than the actual script, you really cannot add code to it and expand it to be a function.

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

  5. #5
    Member
    Join Date
    Dec 1999
    Location
    Columbus, OH
    Posts
    78
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping an unexpected window

    I have had problems with the SetTrap() and ClearTrap() functions working correctly on Windows 98 and SilkTest 5.02. I contacted technical support and they confirmed that it is a bug.

  6. #6
    Senior Member
    Join Date
    Jul 1999
    Location
    Columbus, OH, USA
    Posts
    689
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping an unexpected window

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by AJ:
    If you need to do more than click a button when a window appears, you need to write your own : if wWindow.Exists () ... and you can call that in a function as well.

    Since SetTrap runs in a seperate thread than the actual script, you really cannot add code to it and expand it to be a function.

    <HR></BLOCKQUOTE>


    Using the example above, you COULD test for the window in a testcase by testcase basis:


  7. #7
    Senior Member
    Join Date
    Jul 1999
    Location
    Columbus, OH, USA
    Posts
    689
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping an unexpected window

    Whoops. Disregard the above message...it wouldn't work.

  8. #8
    Junior Member
    Join Date
    Jul 1999
    Location
    Ormond Beach, FL, USA
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping an unexpected window

    I wrote this function to trap unexpected windows, dialogs, etc. I use this instead of a normal SetActive, and I use it alot. I hope this helps.

    Jason

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

    [This message has been edited by AJ (edited 05-23-2000).]

  9. #9
    Junior Member
    Join Date
    Jul 1999
    Location
    Ormond Beach, FL, USA
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping an unexpected window

    Thanks AJ.

 

 

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 12:22 AM.

Copyright BetaSoft Inc.