SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Apr 2001
    Location
    Montreal, CA
    Posts
    74
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exists() returning invalid results

    Hi All,
    I have following problem:
    In my script wObjectName.Exists() is returning false, even though it exists.
    While debugging if I use Desktop.GetActive(), I got correct windowname.
    again, if Use the same expression as (Desktop.GetActive()).Exists()...I am getting False as result.
    What could be wrong.
    Following is the Window Declaration of the Window..
    [-] window DialogBox RegistrationDlg
    [ ] tag "~ActiveApp/[DialogBox]Registration Information"
    [+] StaticText InOrderForBankProductsTo1
    [+] multitag "#1"
    [ ] "$27696"
    [+] StaticText EFINText
    [-] multitag "EFIN:"
    [ ] "#2"
    [ ] "$27681"
    [+] TextField EFIN
    [-] multitag "#1"
    [ ] "$27697"

    Thanks in advance,


    ------------------
    Murali K Parepalli
    Intuit

    [This message has been edited by aspmurali (edited 09-16-2002).]
    _ _ ___________ _ _
    Murali K Parepalli

  2. #2
    Member
    Join Date
    Jul 2002
    Location
    Chennai,TN,India
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Exists() returning invalid results

    Specify Timeout Parameter and Try.
    [ ] Window wWindow
    [ ] wWindow = Desktop.GetActive()
    [ ] boolean bRes =wWindow.Exists(5)


    ------------------
    Babu NM
    Babu NM

  3. #3
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Exists() returning invalid results

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by aspmurali:

    In my script wObjectName.Exists() is returning false, even though it exists. While debugging if I use Desktop.GetActive(), I got correct windowname. again, if Use the same expression as (Desktop.GetActive()).Exists()...I am getting False as result.

    <HR></BLOCKQUOTE>

    [bias based on experience mode ON ]
    In my experience Segue has regressed their compiler in several areas since 5.5 SP1:

    1. ~ActiveApp isn't particularly trustworthy (since 5.0.3.1, actually). Try using ../ instead. ~ActiveApp can run into conflicts with the option for "open menu first" and it can be confused by other menu items containing fragments of a matching window name - ie: Silk gets upset if a window called Error is declared with ~ActiveApp and a menuitem somewhere else is called "Clear Error".

    2. Cascaded calls usually aren't a problem in debug, but the success of Desktop.GetActive().Exists() for your purposes is very much dependent on your test application having input focus prior to your pressing F9 to run your test. If pressing Alt-Tab once doesn't put input focus on your application, keep pressing it until it is, release both keys, then use it to go all the way back to Silk without releasing the alt-key between tabs. Then run your test.

    3. Don't expect the debugger to always correctly translate a variable name into its contents in an expression window method call; use the actual contents of that variable instead (lazy way: copy it from a local or global variables window). Example: 'this' in the expression dialog will work, where this.GetCaption() may not, and the_actual_windowname.GetCaption() will usually work just fine.

    4. Desktop.GetActive() can act like pressing F9 if you use it more than a time or two in debug mode. Or it can just kill Silk.

    5. Since 5.5 SP3 build 1019 you'll occasionally get into a mode where a compile will appear totally happy but the test won't run when you press F9 - nothing at-all happens. You can try "compile all", but most likely you'll have to restart Silk to recover. This is supposedly fixed in the next post SP3 release build [????], whenever that is. BTW, build 1047 adds problems with test plans and Java tables.

    6. Multitag have been an unreliable feature since the instant it was introduced. Use a real tag instead to avoid its tendency to pick the first-found poor-match rather than the best match. Actually there's little need to tag StaticText fields that are just labels for other controls. Since they rarely change, use the actual text itself in a real tag statement. Where it can be used, text is always preferrable for a tag over any other method when test suite reliability is important.

    7. Desktop.GetActive() and ~ActiveApp don't co-exist well.

    8. Be aware that if you just run the SP3 install from Segue downloads, you'll get whatever build number happens to be loaded on the web page that day. Download it instead and label it to ensure that you can always restore a previous build that worked well for you.
    [bias based on experience mode OFF]

    In summary, you should drop the use of ~ActiveApp in favor of a real tag and replace all of the multitag statements with real text-based tags. If you must have tag variability, use a function instead. A login dialog isn't worth the time and struggle required to make ~ActiveApp and multitags work like they should.

    John


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


    [This message has been edited by John J. Miller (edited 09-16-2002).]

 

 

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 04:11 PM.

Copyright BetaSoft Inc.