SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Oct 2000
    Location
    Tucson, AZ
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    declaration for window with no caption

    I'm testing a Win98 application and one of the error messages doesn't have a caption. When I record the window declarations, it gives:

    [-] window DialogBox MessageBox1
    [ ] tag "$MessageBox[1]"
    [-] PushButton OK
    [ ] tag "OK"
    [-] CustomWin Icon1
    [ ] msw tag "[Icon]#1"
    [-] StaticText ExceptionEAccessViolationIn
    [ ] tag "Exception EAccessViolation in module MSVBVM60.DLL at 000BE51B.?Access violation at address 660BE51B in module 'MSVBVM60.DLL'. *"

    How do I change the tag for this message box so it identifies it by the contents of the StaticText for the Exception error message? Using a tag of "#1" for the index doesn't help because I'm using an IF statement to determine if the error exists and it sees the previous window as #1.

    I've tried using a tag of:
    [ ] tag "$MessageBox / [StaticText] Exception EAccessViolation in module*/.."
    I must be doing it wrong because that doesn't work either.

    Thanks!

  2. #2
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: declaration for window with no caption

    I've had a similar situation, several message dialogs have the same tag information and you need to be able to uniquely identify them. The workaround that I'm using is I'll check to see if the static text exists.

    i.e. if MessageBox1.StaticText3.Exists()
    //do something

    This way, if a message box exists, that branch of code will only be executed if the static text is equl to StaticText3.

    I'm very intersted to see if someone knows how to accomplish exactly what you've asked for. Very good question.

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

    Re: declaration for window with no caption

    The answer might be in precisely what you mean by "doesn't work". When you use a tag that includes a reference to a control on the window none of the "record" functions will appear to acknowledge the window dec but all should be fine at script/testcase runtime. There have been a few other recent threads regarding this format for the tag so you might want to go find them for more info.

    My personal experience with this tag format is that I have never been able to get it to work in any of my AUTs but I have gotten it to work just fine using the GMO app that Segue uses for demos and training.

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

    Re: declaration for window with no caption

    I use the same method as described above. I have a lot of windows with the same caption and I use it for tabbed dialog boxes. If I want to see if a specific one exists I check for a unique object on the screen. I have also written my own Exists methods inside the window declaration. For example:


  5. #5
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: declaration for window with no caption

    You can use the unique child StaticText object in the tag:
    The last /.. at the end is mandadory, it tells the Agent to evaluate the parent / child relationship (e.g. a dialog box with any caption, with StaticText Access violation*)

    It is documented in the SilkTest user's guide.
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  6. #6
    Junior Member
    Join Date
    Oct 2000
    Location
    Tucson, AZ
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: declaration for window with no caption

    Thanks, those suggestions were just what I needed to get it working.

 

 

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:58 AM.

Copyright BetaSoft Inc.