SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Sep 2000
    Location
    Schaumburg,IL,60173
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Window Naming Conventions

    Rather than type out something like WindowName.ContainerName.Object.Item.Click() in my 4Test code, I'd like to reference this object by just coding Item.Click().

    Segue support says this is not possible in SilkTest 5.0.3, but I just can't believe that. Does anyone know how I can make this work?

    In addition, I have a dialog box that has about 15 checkboxes on it. I want to write a for loop that will uncheck all the options in the box, but am not sure how to approach this. My initla thought was to declare a list and have the names of the checkboxes as the list elements. Then, I'd use a for each checkboxname in checkboxlist loop to uncheck the boxes and vary the stament by substituting the variable where the name of the checkbox goes in the WindowName.CheckBoxName.UnCheck() statement. Any suggestions?

    Thanks,
    Elke

    [This message has been edited by EAita (edited 09-29-2000).]

  2. #2
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Naming Conventions

    You can... It's a manual process though...

    Here's what you do.

    Example:
    The way to do that is to move Son one level up and add the tag of the parent to it's own


    and if you want to go even deeper by saying OK.Click ()

    Hope that helps


    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

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

    Re: Window Naming Conventions

    I do this all the time now.
    I use a "window" declaration inside my
    captured window declaration, like this:

    window JavaMainWin MainDisplay
    tag "Main Display"

    CustomWin SplitPane
    msw tag "[javax.swing.JSplitPane]Series"
    JavaJFCPageList TabsOfClasses
    tag "Class"
    JavaJFCTable ScrollPaneTable
    tag "#1"
    JavaJFCScrollBar JavaxSwingJScrollPaneScroll1
    tag "#1"

    // A simplified way to reference the Main Table:
    window ClassTable = this.SplitPane.TabsOfClasses.ScrollPaneTable


    main()
    LIST OF STRING lsTableContents

    // this is the long path to the object
    lsTableContents = MainDisplay.SplitPane.TabsOfClasses.ScrollPaneTabl e.GetContents()

    // this is the simplified way to do the same thing
    lsTableContents = MainDisplay.ClassTable.GetContents()


    A even better way to to this is with "winclass" declarations, but I will keep this simple.

    [This message has been edited by RobKapteyn (edited 09-29-2000).]

    [This message has been edited by RobKapteyn (edited 09-29-2000).]
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

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

    Re: Window Naming Conventions

    Could someone tell me how to preserve the indentation in these posts ?

    I hope you can figure this out.

    the "window ClassList" declaration is indented INSIDE of the "window MainDisplay".
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    Columbus, OH, USA
    Posts
    689
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Naming Conventions

    Rob,

    To keep code properly indented, use the "code" reference.

    Click "quote" on AJ's message to see how.

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

    Re: Window Naming Conventions

    Ok,
    Let me try this again...

    By using the "window" keyword as shown here, my test maintenance is also simplified.
    Whenever developers add or remove a frame inside of a window or table, I just recapture the
    new window and then copy over my "simplified" addresses with whatever changes are neccessary.
    The rest of my test then runs without any changes.

    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  7. #7
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Naming Conventions

    To preserve indentation read about the UBB Code
    http://www.qaforums.com/boards/ubb/ubbcode.html




    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

  8. #8
    Junior Member
    Join Date
    Sep 2000
    Location
    Schaumburg,IL,60173
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Naming Conventions

    Thanks for all the advice! Have you tried using this concept across platforms?

    I have two instances of the same application. One is in C++, the other in JAVA. They GUI's look pretty similar, but their inheritance is very different.

    I want to have only one set of test scripts for both applications. Can I use this concept to solve that problem, too?

 

 

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

Copyright BetaSoft Inc.