SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Guest

    How to dismiss unexpected dialog boxes?

    While running a testcase, my application under test shows some dialog boxes (such as error messages) unexpectedly. This may happen at any point in my testcase. Any idea how to monitor for these dialogs and dismiss as they show up? I don't want to add a "check point" throughout the testcase.

    Thanks in advance...

    Sudhakar

  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: How to dismiss unexpected dialog boxes?

    Declare the Error MessageBoxes and at the beginning of the testcase on in your TestcaseEnter ()

    MessageBoxName.SetTrap ("OK")

    This clicks OK whenever that messagebox appears. or if you want to be more generic and not declare the messagebox,

    MessageBox("[DialogBox]Caption/[StaticText]Enter the error message here*/..").SetTrap ("The caption of the button which dismisses it")

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

  3. #3
    Senior Member
    Join Date
    Sep 1999
    Location
    San Jose,CA,USA
    Posts
    340
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to dismiss unexpected dialog boxes?

    All I just tried this with an old script. The biggest "gripe" I had with this method is that it used to require an Agent.FlushEvents() .. and I "Used to" spawn code to trigger the SetTrap via Agent.FlushEvents().

    This no longer seems to be required .. may I sugest to Segue that they re document this method as it is "it got much better" (much like the man turned into a newt). Also it has been my exepriance in the past that this will NOT work when employing System_Execute .. perhaps in Silk 5.0 this may not be an issue.

    By the way for people who have older versions of Silk or QAP where this does not work .. spawn a thread that is in a for loop and does and Agent.FlushEvents() with a generous sleep and this ahould also work.

    By the way here is the example:
    window MainWin NP
    {
    multitag "*Notepad"
    {
    "Untitled*"
    }
    Menu Search
    {
    tag "Search";
    MenuItem Find
    {
    multitag "Find"
    {
    "$3"
    }
    }
    }
    }
    window DialogBox Find
    {
    tag "Find";
    parent NP;
    PushButton Cancel
    {
    multitag "Cancel"
    {
    "$2"
    }
    }
    }
    testcase dialog_handler ()
    {
    INTEGER i = 0;

    // everytime this Dialog Box is encountered it will now
    // be dealt with .. Good Show Segue!
    Find.SetTrap ("Cancel");

    NP.Start ('notepad');
    for (i = 1; i <= 5; i++)
    {
    //print(NP.GetActive())
    NP.SetActive ();
    NP.Search.Find.Pick ();
    print ("--aaa-- action aha .. I have asynchronously picked Find .. ha ha!");


    }
    NP.SetActive ();
    NP.Close ();

    }

    [This message has been edited by rick_weth (edited 09-08-1999).]

    [This message has been edited by rick_weth (edited 09-08-1999).]
    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

  4. #4
    Junior Member
    Join Date
    Sep 1999
    Location
    Fuquay-Varina,MC,USA
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to dismiss unexpected dialog boxes?

    SendTrap is a pain, if you have some time too do some development, I'd recommend looking at the do..except structure OR looking at the recovery system (AppState stuff).

    I did a lot of work with blocking everything in do..except loops so that I could handle all kinds of anamolies. But hopefully SendTrap will catch your problem.

    P.S. If you are having problems with MSN or Netware messages (i.e. "\\SUPPORT is out of disk space" you can turn a lot of that stuff off in the regsitry.

    ------------------
    Scott Kavanagh
    mailto:automater@mindspring.com
    mailto:thekman@mindspring.com
    Scott Kavanagh
    mailto:automater@mindspring.com
    mailto:thekman@mindspring.com

 

 

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

Copyright BetaSoft Inc.