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
    Dec 2003
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Identify a button with inconstant label?

    How would one identify a button in WinRunner that has one label before mouse-click and another after? What would be the most optimal expression for the button's label attribute? Would you use the index value? I might... but I'm not a WinRunner tester... Besides, what if it matters to the script what label the button has before and after the mouse click? It would matter if I were writing the script (to ensure the button's label is consistent with the action)... But they seem to simply want to know how to identify the button when the label is not constant (which I think forgoes the logic of the script anyway - unless they just don't care and only want to confirm the button exists at all...? sigh).

  2. #2
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    Location
    St. Louis - Year 2025
    Posts
    15,609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Identify a button with inconstant label?

    You could use one of the TSL functions of the class:
    "*_get_info();"

    (I hope I'm not helping answer an exam question!)

  3. #3
    Senior Member
    Join Date
    May 2001
    Location
    Ankh-Morpork
    Posts
    2,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Identify a button with inconstant label?

    An object's label is typically used in its GUI map physical description because it is often (but not always) a good way to ensure there is some attribute which is unique to that object's definition. In cases where it is not practical to use its label, you can delete it from the GUI map's physical description for that object; but you then need to ensure that the remaining attributes still describe that object in a unique way (at least within its parent window), or you need to add other attributes and their values to the physical description until it is unique within its context. More common though is to change the object's physical description by simply using a regular expression for the label. The sub-chapter in the GUI map section of the User's Manual regarding Regular Expressions covers how to do this pretty well, I believe. Also, searching this forum for "regular expression" and "regexp" will give you quite a few hits on this topic as well.
    web site | [url=http://www.ebookworm.us/[/url]

    [i]...Sound trumpets! Every trumpet in the host! / Sixty thousand, on these words, sound, so high the mountains sound, and the valleys resound.</i] (The Song of Roland)

 

 

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 11.54%
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 02:46 AM.

Copyright BetaSoft Inc.