SPONSORS:






User Tag List

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

    Window name of an object

    Hi,

    I have an object. I am want to know the window name of an object without manually refering GUI.

    Is there any function available for this.

    Thanks

  2. #2
    Senior Member
    Join Date
    May 2003
    Location
    Austria
    Posts
    1,480
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Window name of an object

    Not sure how you want to proceed. But usually you'll need a set_window before accessing an object. The funtion GUI_get_window() returns the window object that was last set (by using set_window()) - so it should be the parent window of your object.

    Is that what you want?

    Regards,
    Juergen

  3. #3
    Member
    Join Date
    Aug 2004
    Posts
    374
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Window name of an object

    Not sure if this helps. The following code will get the current window in focus(Which should be the window you want as the object is in focus)
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">win_get_info(&quot;{ class: window, active: 1 }&quot;, &quot;label&quot;, name);</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">
    Richard Hunter

  4. #4
    Junior Member
    Join Date
    Oct 2004
    Location
    Chennai
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Window name of an object

    hi all,

    thanks for the reply. I don't need the active window or last stated window.

    I am dynamically picking the gui object. I want to retrive the details abt the object. In which window it actually appears.

    Thanks
    Sadagopan

  5. #5
    Member
    Join Date
    Aug 2004
    Posts
    374
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Window name of an object

    I do not have access to winrunner at the moment but I think the function obj_get_info will be of use.
    If you know the object name you can use
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">obj_get_info(&quot;objectname&quot;,&q uot;class&quot;,class);</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">the help will show what information you can get about the object, which I hope includes the window name of the object.

    If you do not know the object name use
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">set_window(&quot;{active: 1}&quot;
    obj_get_info(&quot;{focused: 1}&quot;,&quot;class&quot;,class);</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">sorry if I have still got the wrong end of the stick
    Richard Hunter

 

 

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 02:15 AM.

Copyright BetaSoft Inc.