SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Dec 2000
    Location
    Phoenix, AZ
    Posts
    371
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting caption for \"not unique\"

    I am trying to create a script where I open a window, then double click on a row in a table which opens another window. I then am going to compare the values displayed on each screen to make sure that the second window actually displayed. I am first trying to do this with the caption. However, when I do a GetCaption I receive a message stating that the window is "not unique." The GetCaption for the first window works because it is the only one open. But the GetCaption for the second window fails because there are now two windows open. Any ideas on how I can handle this?

    Thanks.

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

  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: Getting caption for \"not unique\"

    set the following agent option prior to checking the caption: Agent.SetOption (OPT_VERIFY_UNIQUE, FALSE);

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

  3. #3
    Junior Member
    Join Date
    Feb 2002
    Location
    Kiowa, CO,USA
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting caption for \"not unique\"

    Another option (for future reference, since you've already resolved this one) is to use an instance value in your tags for the windows having a common caption:

    [ ] window MainWin MyWin1
    [ ] multitiag "Common Caption"
    [ ] "Common Caption[1]"

    [ ] window MainWin MyWin2
    [ ] multitiag "Common Caption[2]"

    That will take care of the "not unique" complaint (if the Agent option is set). Keep in mind, however, that once you set MyWin2 active, ST may now see this as the first instance, for which the above tag is no longer valild. I'd say for moveable win objects, stick with your solution.


    ------------------
    Jon A. Lamprech
    jlamprech@yahoo.com

  4. #4
    Senior Member
    Join Date
    Dec 2000
    Location
    Phoenix, AZ
    Posts
    371
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting caption for \"not unique\"

    Thanks for the tip. However, I have handled this by getting the active window and then finding the caption of the active window.

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

  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting caption for \"not unique\"

    You can also turn off the verify uniqueness flag in Agent Options - Verification tab, it can also be done with a 4-test statement within your testcase or function.

    Agent.SetOption (OPT_VERIFY_UNIQUE, FALSE)

    Hope this helps.

 

 

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 03:59 AM.

Copyright BetaSoft Inc.