SPONSORS:






User Tag List

Results 1 to 2 of 2

Thread: Silk 5.03

  1. #1
    Junior Member
    Join Date
    Aug 2000
    Location
    NYC, New York, USA
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Silk 5.03

    Hi,

    I am using SilkTest 5.0.3 on a web based application. I have few objects
    remain same
    for all the available screen frames. I want to derive a basewindow which
    derives from
    AnyWin class and has these few more objects (Link texts, Texbox & push
    button) as its
    properties.

    I need help in following:

    1. Please help me how do I add these objects to my newbase window which is
    base for my
    application being tested. The example syntax will be verymuch helpful.


    2. Also, please tell me whaz the whole idea to derive base window and
    building other
    windows deriving from that? Does it help in reducing the number of
    windows declared?

    3. If there is any web site to gothrough to study about building the
    infrastructure while
    starting silktest, I'm interested.

    Thank you very much.

    Sabina


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

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk 5.03

    Hi Sabina,

    Say that we have two windows declared below,

    window BrowserChild MyBrowser1
    tag "My Browser One"
    parent Browser
    HtmlPushButton OK
    ...
    HtmlPushButton Cancel
    ...
    HtmlListBox ListBox1
    ...

    and,

    window BrowserChild MyBrowser2
    tag "My Browser Two"
    parent Browser
    HtmlPushButton OK
    ...
    HtmlPushButton Cancel
    ...
    HtmlImage Image1
    ...


    In both declarations the common objects are the HtmlPushButtons OK and Cancel. We can place these into a generic declaration. Firstly, we need to create a new class...

    winclass MyBrowserChild : BrowserChild
    parent Browser // Common to both declarations
    HtmlPushButton OK
    ...
    HtmlPushButton Cancel
    ...

    Then we declare instances of the new class,

    window MyBrowserChild MyBrowser1
    tag "My Browser One"
    HtmlListBox ListBox1 // Declare unique objects

    and,

    window MyBrowserChild MyBrowser
    tag "My Browser Two"
    HtmlImage Image1 // Declare unique objects

    We can add methods and properties etc... to our new window class.

    The reasons for adopting this approach are,
    1. we reduce if not eliminate redundant declarations,
    2. reduces the longer need of script maintenance by increasing reusable code - methods and properties.

    This topic is covered in the advanced training course.

    John.



    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.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 09:25 AM.

Copyright BetaSoft Inc.