SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Apr 2004
    Location
    Chatsworth
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    GetProperty of static label that changes

    How do I get the Text property for a static label (LSTATIC)?

    The label is the number of items shown in a list box out of a total number, i.e. "100/129". The label gets assigned different values by the program.

    I've used a VP to get the properties to try to create an SQAGetProperty call, but the only identifying property is Text which is set to varying values. There is no ObjectIndex.

    I've looked at the dialog containing the label in a resource viewer:

    LTEXT "Static", 9041, 62, 184, 31, 8

    "Static" is its initial value. I've tried the 9041 value as the ObjectIndex, but that's not recognized.

    Any ideas on how I can do this using GetProperty?

    Do I have to resort to OCR on a RegionImage? The OCR sees the slash character as '1', and I can't guess which '1' char is really the '/'.

  2. #2
    Junior Member
    Join Date
    Oct 2005
    Location
    Hyd
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetProperty of static label that changes

    Hi,

    Try the following steps:

    1. Go to Tools -> GUIRecordOptions -> select 'Label' in the object type box

    2. change the recognition order by selecting the 'Text' and clicking the Move down button.

    This may solve the problem

    Thanks
    Bhaskar

  3. #3
    Senior Member
    Join Date
    Jul 2002
    Location
    Troy, IL USA
    Posts
    114
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetProperty of static label that changes

    Assuming you are using an HTML app, that you want to extract the value in code and that the label name is a Static name value:

    Use Inspector to get the Recognition Method and object property that contains the value you want to use.

    Also ensure you are setting your context and frame through the Browser and Window functions, then use SQAGetProperty to get the value:

    BTW: changing values in Recognition Priorities changes it for everyone using the project, so be careful making these changes.

    The code:

    Result = SQAGetProperty(recMtd,objProperty,rtnVal)
    recMtd = Recognition method copied from Inspector
    objProperty = valid object property for label, e.g., "innerText", "value", "name"...
    rtnValue = the value returned by the SQAGetProperty function.

    See Tools--Inspector and Help--SQABasic Reference for additional info.
    Tom B.
    _______________________________
    Automation Team Lead
    Rental Quality Assurance
    Enterprise Rent-A-Car

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 04:09 PM.

Copyright BetaSoft Inc.