SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: window physical properties problem

    Hi.
    You must dynamically modify GUI map file every time you run your script.
    You have to change the value of the "label" property based on the value of "handle" before running the rest of your test. Donít forget to create unique logical names for both windows.

    OlegR


    ------------------

  2. #2
    Senior Member
    Join Date
    May 2001
    Location
    Hickory,NC, USA
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    window physical properties problem

    I'm testing a client server application which is using non standard windows objects/window.

    When i use GUI spy and look at all standard properties. The only difference i see is the "handle" and "label" property. MI support told me that "handle" property changes all the time? Therefore, i will need to rely only on one property which is label. The problem now is winrunner see some of the windows the same. As a result i get two different windows with the same name and therefore there are problems with the objects in these windows. Any suggestions is greatly appreciated.

    ------------------

  3. #3
    Senior Member
    Join Date
    Dec 2000
    Location
    NY, NY, USA
    Posts
    165
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: window physical properties problem

    The window's handle value will change. The only way to use it would be to code a function to return the handle of the foreground window (cf. WIN32API functions).
    Or, try coding with the label property and add enabled:1 to uniquely identify the window (when multiple windows have the same label).

    Jerry

    ------------------

  4. #4
    Senior Member
    Join Date
    May 2001
    Location
    Hickory,NC, USA
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: window physical properties problem

    Jerry and Oleg, Both your suggestions will most likely solve my problem. MI support didn't have a good solution for this. Probably they were thinking that i'm referring to objects so have asked me to use the Analog Mode.
    Could you please give me more details on your suggestions?

    Thanks again!
    Ainsley

    ------------------

  5. #5
    Senior Member
    Join Date
    Dec 2000
    Location
    NY, NY, USA
    Posts
    165
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: window physical properties problem

    As I understand it, setting window context is your problem. Try;

    _set_window("{class:window, label:<label of window>, enabled:1}");

    If you need to get the window's handle, try:

    win_get_info("{class:window, label:<label of window>, enabled:1}", "handle, hWin);

    Hope this helps.....

    Jerry

    ------------------

  6. #6
    Senior Member
    Join Date
    May 2001
    Location
    Hickory,NC, USA
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: window physical properties problem

    Jerry,
    I typed in:
    rc=win_get_info("{class:window, label:<No title>, enabled:1}", "handle, hWin");

    rc is returning -10112

    Using GUI spy, i'm able to get the handle number but then if i select it as a required property, as i understand it changes during each run.
    Thanks
    Ainsley

    ------------------

  7. #7
    Senior Member
    Join Date
    Dec 2000
    Location
    NY, NY, USA
    Posts
    165
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: window physical properties problem

    Ainsley;

    Be careful with syntax...

    rc=win_get_info("{class:window, label:xxx, enabled:1}", "handle", hWin);

    Do you get rc =0? Do you get the handle?

    Jerry

    ------------------

  8. #8
    Senior Member
    Join Date
    May 2001
    Location
    Hickory,NC, USA
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: window physical properties problem

    Jerry,
    I didn't get rc=0, No handle number.I have a question. Does the handle changes all the time. What is the difference between this handle number and the one i get using the GUI spy?

    Here is what i tried:
    rc=win_get_info("{class:window, label:<No title>, enabled:1}", "handle", hWin);
    pause(hwind);

    Thanks
    Ainsley

    ------------------

  9. #9
    Senior Member
    Join Date
    Dec 2000
    Location
    NY, NY, USA
    Posts
    165
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: window physical properties problem

    Ainsley;

    Your syntax is still bad....

    rc=win_get_info("{class:window, label:???, enabled:1}", "handle", hWin);

    For ??? substitute the value of the window's label. Also, the pause statement should name the variable you used, ie. hWin not hwind.

    Handle is a long integer assigned by Windows upon open. Each time you open the window you CAN get a different value.

    Jerry

    ------------------

  10. #10
    Senior Member
    Join Date
    May 2001
    Location
    Hickory,NC, USA
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: window physical properties problem

    Jerry, Wouldn't it be a problem for the window value to change? That would mean the window would not be identified correctly. I will give it another try tommorow though. Thanks for all the help

    Thanks
    Ainsley

    ------------------

 

 

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 01:44 AM.

Copyright BetaSoft Inc.