SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Feb 2003
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ST 6.0.1.0 Captures Applets with Inconsistent Indices

    Hi All,

    I am using SilkTest 6.0.1.0 to capture the definition of a web page consisting of 3 Java Applets loaded in separate frames. I encountered 2 problems with the definition capture process.

    The first problem is that the definitions I captured for the applets are not ordered consistantly. For example, on one capture I may get the definitions in the order of app1->app3->app2 and on another capture I get the order app3->app2->app1.

    As a workaround, I waited for the "Record Window Definition" dialogbox to capture the definition, then put the mouse cursor on some controls to verify the validity before copying the captured definition. This way I was able to consistantly produce the definition in the same order. I wonder if there is a better way to do this? I'd rather not use additional delays in my script.

    The second problem is more severe. I am now able to capture the 3 applet definitions in consistent order, but SilkTest somehow assigns different indices to the applet controls! Take a look at some "well-ordered" definition I had captured on 2 separate attempts below:

    Capture 1:
    [+] JavaApplet Panel56
    [ ] tag "$panel56"
    [+] JavaAwtTextField Text0
    [ ] tag "$text0"
    [+] JavaAwtStaticText MessageText
    [-] multitag "Message:"
    [ ] "$label3"
    // the rest omitted ...
    [+] JavaApplet Panel67
    [ ] tag "$panel67"
    [+] CustomWin Panel70
    [ ] msw tag "[DCL.MeetingServer.by]$panel70"
    [+] JavaAwtScrollBar Scrollbar2
    [ ] tag "$scrollbar2"
    // the rest omitted ...

    Capture 2:
    [+] JavaApplet Panel194
    [ ] tag "$panel194"
    [+] JavaAwtTextField Text2
    [ ] tag "$text2"
    [+] JavaAwtStaticText MessageText
    [+] multitag "Message:"
    [ ] "$label15"
    // the rest omitted ...
    [+] JavaApplet Panel205
    [ ] tag "$panel205"
    [+] CustomWin Panel208
    [ ] msw tag "[DCL.MeetingServer.by]$panel208"
    [+] JavaAwtScrollBar Scrollbar8
    [ ] tag "$scrollbar8"
    // the rest omitted ...

    Notice Capture 1 shows JavaApplet Panel56 followed by Panel67 while Capture 2 shows Panel194 then Panel205. The tags also use those index numbers. The difference in indexing means I cannot find the controls I'm looking for even though SilkTest can correctly captured the page definition each time.

    I've submitted this problem to Segue Software for tech support. The solution they gave me is to do a recursive loop on all the applet objects and find the controls I am looking for. I tried their loop and it took 5 minutes to find a control on a large page. This is unacceptable but sadly, the Segue tech support guy says that this is the only solution he knows of. I know that if I consistantly produce the similar 2-level definition structure I'd only need to iteratively loop on the controls for 2 levels deep in order to find the controls I want, but still, that's not a "solution" but a "workaround." My manager won't be happy about it due to the low maintainability. Through numerous capture testing, I was able to reproduct the index order of 56, 67, ... (identical to capture 1) several times but in the other cases the indexing is completely different.

    I wonder if anyone has encountered similar indexing problem with multiple applets on one page. If so, how did you resolve such problems? Is it caused by the order of which applet gets loaded first or some other factors?

    Thank you for any tips and hits.

    David

  2. #2
    Member
    Join Date
    Jan 2003
    Location
    Norwood
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ST 6.0.1.0 Captures Applets with Inconsistent Indices

    When Java Applets return inconsistent declarations, I use CaptureAllClasses on each of the windows that contain the applet. The result file will output the object name and properties, and functions that can be applied to the control. Copy this from the .res file and paste it into your .inc. Hope this helps.

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

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

    Re: ST 6.0.1.0 Captures Applets with Inconsistent Indices

    Jim! where are you at these days?

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

  4. #4
    Member
    Join Date
    Feb 2003
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ST 6.0.1.0 Captures Applets with Inconsistent Indices

    Thanks for your suggestion. I've done what you suggested but the generated applets still vary in the index.

    However, I was able to capture the applets with a multitag associated with each one of them. The multitag contians a unique and static identifier, such as "#1", "#2", "#3", etc. By writing a function to associate the applet with the proper index I was able to consistently identify each applet at runtime.

    Once again, thank you for your help.

    David


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

 

 

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 12:44 AM.

Copyright BetaSoft Inc.