SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    JQ
    JQ is offline
    Junior Member
    Join Date
    Jan 2000
    Location
    Maynard,MA,USA
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Verifying Children of VB Frames

    Most dialogs in the SUT have controls nested inside a frame control, so if I use verifyproperties to verify the dialogs controls, only the frame control is verified.

    I can't seem to figure out how to verify child controls of a VBFrame control. Do I need to write my own verification method and use GetChildren(), etc....?

    I am new to SilkTest, so I very much appreciate answers to these rudimentary level questions.

    Thanks,
    Jim


  2. #2
    Member
    Join Date
    Dec 1999
    Location
    Seattle, WA
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verifying Children of VB Frames

    it's been awhile since having to deal with VB apps, but I'd recommond a couple things. In your frame, IGNORE the frames when it comes time to defining the children of that dialog box. You can "hide" the extra layer by adding to your tag statement, e.g.

    instead of

    window VBDialogBox MyDialog
    tag "My Dialog"

    VBFrame MyFrame
    tag "My Frame"
    VBTextField MyField
    tag "My Field"

    and referring to the object as MyDialog.MyFrame.MyField

    You would HIDE the frame by including its identifier in the MyField frame, as here

    window VBDialogBox MyDialog
    tag "My Dialog"

    VBTextField MyField
    tag "[VBFrame]My Frame/My Field"

    now you can refer to the object as MyDialog.MyField

    to get a list of all of your objects I'd recommend using the WindowChildren() function as it returns those DEFINED in your framework, not those detected by the playback engine at runtime.


    ------------------
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR></BLOCKQUOTE>
    <BLOCKQUOTE]<font size=1 face=Verdana, Arial, Helvetica]quote:</font]<HR]It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR]</BLOCKQUOTE]

  3. #3
    JQ
    JQ is offline
    Junior Member
    Join Date
    Jan 2000
    Location
    Maynard,MA,USA
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verifying Children of VB Frames

    Thank you for your response. I have done exactly what you suggested by using fully qualified tags in my frame files. I can access nested controls directly as such:

    VBControl MyControl
    tag "[VBFrame]MyFrame/[VBControl]MyControl

    then MyDialog.MyControl works fine. It bypasses MyFrame.

    But! When I use record testcase to capture the VerifyProperties code, only MyFrame is considered a child of the dialog. MyControl does not appear in the list of children. If I enter MyControl in the list manually, the test case fails when it is run. The VerifyProperties method doesn't see these nested controls.

    Any Ideas about why MyControl is not considered a child of MyDialog when "capturing" children of MyDialog even though you can access it as if it was a child?

  4. #4
    Member
    Join Date
    Dec 1999
    Location
    Seattle, WA
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verifying Children of VB Frames

    I would probably build something custom for "verify everything" and base it around WindowChildren() rather than relying on partner's built in recording verification technique, which I believe uses the GetChildren() method. Since you've already ventured into fully qualified tags, I'm guessing you have some programming background and would find it pretty easy to create. As an experiment try the following statements...

    MyDialog.Invoke()
    ListPrint(MyDialog.GetChildren())
    ListPrint(WindowChildren(MyDialog))

    you will see that the second list has no dynamically instanciated(sp) objects from the page, and therefore you can use that function to loop...

    e.g.

    WINDOW wObj
    for each wObj in WindowChildren(MyDialog)
    ...do some verify

    I gave up a long time ago on using the recorder for anything further than: (1) intially capturing a frame, and (2) making sure my tags are kosher as I make changes to the tags (using record, window identifiers)

    hope this helps. is this all a workaround of a Silk bug? no comment.

    ------------------
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR></BLOCKQUOTE>
    <BLOCKQUOTE]<font size=1 face=Verdana, Arial, Helvetica]quote:</font]<HR]It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR]</BLOCKQUOTE]

  5. #5
    JQ
    JQ is offline
    Junior Member
    Join Date
    Jan 2000
    Location
    Maynard,MA,USA
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verifying Children of VB Frames

    Thanks for the confirmation. At least I can proceed knowing others find the same limitations.

    I did discover one thing however. I changed the class inheritance of the VBFrame control in the vbclass.inc file from StaticText to ControlMultiWin. Suddenly, if you use the Record/Testcase feature and verifiy the properties of the dialog, the entire hierarchy of the dialog is captured. It seems that the identifiers in the frame file continue to remain a mystery to the capture process though. The grandchildren identifiers are recorded as if they are undefined.

    This works for quick and dirty approaches. I suppose custom verifications are the way to go anyway.

    Thanks for your help.

    [This message has been edited by JQ (edited 01-25-2000).]

  6. #6
    Member
    Join Date
    Sep 1999
    Location
    Austin, Texas
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verifying Children of VB Frames

    As you noticed, using complex tags breaks the SilkTest recorders. This is one reason it is better to ignore them via the classmap.

    Bret Pettichord
    Book - www.testinglessons.com
    Hotlist - www.testinghotlist.com
    Consulting - www.pettichord.com

  7. #7
    Member
    Join Date
    Jul 1999
    Location
    Raleigh, NC
    Posts
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Verifying Children of VB Frames

    The only DISadvantage that I am aware of using classmap and directly editing the default included Segue INC files is that these changes are local to that specific machine.

    If you maintain a multi-user test lab you will need to implement a process for distributing those changes to all testers.

    It's a shame that modification of the tags directly doesn't get assimilated into the recorder processes.

 

 

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

Copyright BetaSoft Inc.