SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    159
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Good Grief! Code Lines are too long


    I did a File New test frame and selected my App from task list. This captures all the objects on welcome screen1.

    It recognizes all the buttons and editfields
    on the screen. But it classifies many as Custom Win. There seem to be several levels of JPanel .

    The script runs correctly. The problem is the
    lines are 300+ characters long.

    xxx.xxx.xxx. Custom Win( ...) .SetActive()


    I called support and confirmed the problem
    with them. They tried ignoring customwinclass using the class map, but it didn't work. Support is giving my file to the other engineers.

    The screen looks very simple ( a 3 pane layout).
    I'm not sure why the code generated is
    so long and complicated.

    Is this the way Java is?

    How much of an issue are these long lines?
    Will it make scripts so
    unreadable , that it will be hard to modify and maintain them?


  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    186
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Good Grief! Code Lines are too long

    As a workaround, you could use a "with" statement to make your code more readable. Look for "with statement" in SilkTest help for more info.
    Tom

  3. #3
    Junior Member
    Join Date
    Jul 1999
    Location
    Piscatway NJ US
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Good Grief! Code Lines are too long

    UnCheck "Show all classes" in the record window declarations dialog.
    Tony

  4. #4
    Senior Member
    Join Date
    Sep 2000
    Posts
    159
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Good Grief! Code Lines are too long

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Apontori:
    UnCheck "Show all classes" in the record window declarations dialog.
    Tony
    <HR></BLOCKQUOTE>

    I bring Record window declarations dialog.
    I click "Options" button. But there is
    no "Show All Classes" option.

  5. #5
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Good Grief! Code Lines are too long

    Read the previous thread titled:
    "Strange Class Mapping behavior with Java (SilkTest bug ?)"

    Quickly:
    "Show All Classes" appears in the "Record Class" dialog, not "Record Window Declarations". This is just stupid design by Segue.

    Then, class mapping with Java is completely different than other class mapping. Do not be surprised that Segue's "support" people do not know this.
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  6. #6
    Junior Member
    Join Date
    Nov 2000
    Location
    Burlington, MA
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Good Grief! Code Lines are too long

    We have seen something very similar to what you are talking about. Our solution was to bump the controls we needed closer to the root in the windows decl. Basically this entails adding, to the beginning of the objects tag, it’s parents. Then we could move the control towards the top of the hierarchy. In recording actions, identifiers, etc… you will still see the long lines of code, but if you handle it by hand you are able to create much shorter lines within the script. Below is a before and after example of what we did.

    A line of code would look like what you are getting;
    Our solution;
    Then in a script we can do something like this;
    Hope that helps

    -T


    [This message has been edited by T Frothingham (edited 02-05-2001).]

  7. #7
    Senior Member
    Join Date
    Sep 2000
    Posts
    159
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Good Grief! Code Lines are too long

    Yes, thanks so much!
    I will study this.

  8. #8
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Good Grief! Code Lines are too long

    Raul:
    I think that you now realize that the reason your references are so long is that you have "Show All Classes" turned on.

    But, even so, your references can still get long.
    My solution is a little different than T's.
    Sometimes I add "shortcut definitions" at the end of a window's declarations.
    This way, when the developers change add or remove a frame in a new version,
    I just recapture the window and change the shortcut definitions.
    No other changes are needed in my tests.

    Look up SilkTest help on the "WINDOW data type" and study the following example:
    -Rob

    [This message has been edited by RobKapteyn (edited 02-05-2001).]
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

 

 

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:45 PM.

Copyright BetaSoft Inc.