SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Nov 2000
    Location
    Ulm, DE
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get the Class of a Custom Win

    Hello,

    I have some custom window in my application and I mapped them to the standard classes. When I do a Classof (win) or GetClass (win) it returns "CustomWin" instead of the class I mapped it to.

    How do I return the class of the custom window I mapped it to?

    Thanks.
    Silverter - A guru was once a beginner

  2. #2
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get the Class of a Custom Win

    You could try the GetTag() method. But this method returns the fully qualified tag which contains all of the ancestor's of the object, as in [from the online help example for the GetTag() method]:

    Therefore to use this technique you will need to process the string returned by GetTag() to strip just the object's class [assuming in your case that this is not just CustomWin--you are going to have to experiement]. To post process this string I have attached two functions I wrote called StripBefore() and StripAfter(), which could be used to strip the "Checkbox" class from the above string.

    Review the comments for these functions for usage in the attachment. [This file was uploaded as a Silk *.inc file, and hopefully can be saved with that extension to preserve its file format for Silk]

    Hope this helps.

    -Terry Horwath



    [This message has been edited by Terry Horwath (edited 11-23-2000).]

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

    Re: How to get the Class of a Custom Win

    Hi,

    All class mapping information is stored in the partner.ini file under the section [ClassMap]. So you could use the ini file functions to return the class mappings.

    Have you tried the 'class' property? Though I imagine that since the GetClass () method was unsuccessful, this may also be the case for the class property.

    John.
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com

  4. #4
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get the Class of a Custom Win

    A subtle correction to John's post indicating that class mappings are located in partner.ini--that is true if you are not using an Option Set to define options for the application under test. If you are using an Option Set then the class mappings are stored in that *.opt file and not partner.ini.

    -fyi, Terry Horwath

 

 

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 07:15 PM.

Copyright BetaSoft Inc.