SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Aug 2001
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Windows not being recognized

    I am using SilkTest 5.0.3 on a VB app and there are a few forms that are not being recognized when I run a script. It fails at windowXXX.SetActive(). The window and all of it's objects are identified properly when using 'Record Window Identifiers' and when recording actions. I have played around with the tag, including other things (like Class), it hasn't helped.

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

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows not being recognized

    Is there anything in the "failure" that gives you a clue? Any specific exception message? Can you set a breakpoint there and step through it in debug?

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

  3. #3
    Junior Member
    Join Date
    Aug 2001
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows not being recognized

    In debug mode it goes right to DefaultTestCaseExit(), the error message is as follows: "Error: Window '[VBForm]Outsource Prospect Detail Screen*' was not found".

    With this particular form we use the * in the tag because the caption is very long, but including the full caption makes no difference and I have another form without any wildcard characters in the tag and I have the same problem. We have had cases in the past where a form looks good using Record Window Identifiers but fails to be identified properly from a script.

    I have heard that SilkTest uses different algorithms to identify objects so it is possible to get this kind of paradox. Have you heard of this? Any work-arounds?

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

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Location
    Westford, MA, USA
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows not being recognized

    Here's a diagnostic sequence for you.

    Go into your SilkTest program directory and on the last line of startup.inc add a use statement for the .inc file where you have declared your troublesome window. (You'll want to remember to delete this later.)

    Shut down the SilkTest GUI (Agent not necesssary), then reboot it. (This will cause the SilkTest to read in your window declaration so that Record - Identifiers can pick it up.)

    Put your script in debug mode and put a breakpoint at the line where you're trying to set your window active.

    Run to the breakpoint, then exit the debug session and select Record - Identifiers and point to the window in question.

    If you wait a few seconds, does Record - Identifiers report back the name you've assigned this window in your inc file, or do you get a garbage string with square brackets and slashes and such?

    The idea is to see whether you have really written a tag that describes your window in that particular state.

    AG

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

  5. #5
    Junior Member
    Join Date
    Aug 2001
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows not being recognized

    agroves,
    I couldn't get it to compile with the use statement you suggested. I kept getting an exception error and got kicked out of SilkTest each time I tried it. Any other suggestions?

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

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Location
    Westford, MA, USA
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows not being recognized

    All I'm trying to do is make sure the window declaration for the problematic control or window is included in the compile so that when you pause the debug session, you can exit debug and use record-window declarations to verify that you can point to the control and get back the name that you have assigned to the control in your .inc file. If you can't get back the name you assigned, you know you have a tagging problem, and you can experiment with the tag 'til you get something that works.

    I'm not sure what your harness looks like, so I don't know if the best route is to add a use statement to startup.inc, or add it to your .t file, or temporarily move the window declaration to the top of the .t file, or just do nothing. Maybe you can try the just-do-nothing option first and verify that record-identifiers generally reports back your given names for the other windows.

    As for why SilkTest may be resolving the tag correctly in some cases but not others -- you might want to track down the order your window declarations are compiled in, based on the use statements. SilkTest will look for what it thinks is the first match, then quit. Maybe the use statements are arranged differently for some of your .t files than for others, affecting the order the .inc files are compiled in? In cases where I have to tag with strings, I put all the string literals into one file, then sort the strings into two groups (strings without wildcards, and strings with wildcards), and within each group, the sorting is by longest-string-first. That way, SilkTest never gets confused.

    AG



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

  7. #7
    Junior Member
    Join Date
    Jul 2000
    Location
    Rosemont, IL USA
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows not being recognized

    glynch,
    ..it doesn't sound like SetActive is a proper method to call for your vb app. besides, you need not call this method if there's no other forms open at the time. check if indeed SetActive is a method available to that particular class you declared. if it is, well i guess it is since your script compiles, then try using dynamic tags.
    john yu

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

 

 

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

Copyright BetaSoft Inc.