SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Sep 2002
    Location
    Rancho Santa Margarita, CA, USA
    Posts
    42
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Closing unexpected dialogs whose caption is the same as the MainWin\'s

    What's the correct or easy way of closing unexpected Dialog Boxes (basically displaying error messages) whose captions are the same as the MainWin's? (without tweaking the TestExit () function)

    For example:
    In your .inc file, the MainWin is named "TestApp". When an unexpected error is encountered, the caption of the Error Box that gets displayed is also "TestApp" (the developer is too lazy to assign or use a different caption for his error messages so the default <application name> gets used). If you try to execute the very next testcase and one of these unexpected dialogs is present, you get the error "TestApp is not unique".

    Please give an example or two, if possible.

    Thanks.


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


    [This message has been edited by GilbertE (edited 01-07-2003).]

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Closing unexpected dialogs whose caption is the same as the MainWin\'s

    You shouldn't get the '...isn't unique' error if one is declared as a MainWin and the other is declared as a DialogBox. Have you tried setting the 'Agent.SetOption (OPT_VERIFY_UNIQUE, FALSE)' Agent Option?

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Closing unexpected dialogs whose caption is the same as the MainWin\'s

    shouldn't the next test start from a clean basestate?
    Where is your recovery system?

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

  4. #4
    Member
    Join Date
    Sep 2002
    Location
    Rancho Santa Margarita, CA, USA
    Posts
    42
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Closing unexpected dialogs whose caption is the same as the MainWin\'s

    I just use the Default Recovery system and I did not set the Agent option to set the UNIQUE stuff to FALSE.
    Any additional suggestions or examples?


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

  5. #5
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Closing unexpected dialogs whose caption is the same as the MainWin\'s

    If your dialogs have the same caption as the MainWin, it is time to tell DEV to stop doing that in order to help make the automation effort go more smoothly.

    Since that won't be an overnight change, you can do this to help things play back correctly, but the recorders won't like it....

    suppose you have two dialogs with the caption "My Application".

    Dialog One has a textfield with a caption "Name" that dialog two doesn't.

    Dialog Two has a textfield with a caption "Address" that dialog one doesn't

    create the tags for the two dialog boxes to look inside the dialog for the unique objects.

    SilkTest will be able to tell the difference between these windows after this and will be able to tell which one to close.

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  6. #6
    Senior Member
    Join Date
    May 2002
    Posts
    448
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Closing unexpected dialogs whose caption is the same as the MainWin\'s

    Try this out.

    In case of such an error dialog appearing, write a error handling code. Preferably in a do except loop. Get the active window on the desktop with a Desktop.GetActive (). Then check the class of the window returned by the GetActive call with a Classof () call. If the class is of any other type than MainWin hit a Desktop.Typekeys ("<Alt-F4>") untill MainWin is the active window.

    Let us know if this approach works.

    [This message has been edited by witchcrop (edited 01-07-2003).]
    Life, that dares send, A challenge to his end,
    And when it comes say, Welcome friend.

  7. #7
    Member
    Join Date
    Sep 2002
    Location
    Rancho Santa Margarita, CA, USA
    Posts
    42
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Closing unexpected dialogs whose caption is the same as the MainWin\'s

    Thanks a lot for the tips!
    I've mentioned this "same dialog captions" to the head of dev here and he said "we'll see what we can do" so there's hope though it's not going to happen overnight.

    It seems like I'll just have to do a separate windows declaration for this ErrorBox/MessageBox that has the same caption as the MainWin.

    I'll give all your suggestions a try asap.

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

  8. #8
    Member
    Join Date
    Mar 2002
    Location
    Pune, MH, India
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Closing unexpected dialogs whose caption is the same as the MainWin\'s

    How to close the messagebox

 

 

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 10:53 PM.

Copyright BetaSoft Inc.