SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    question about win_exists() function

    User (MichaelKatsilis@hotmail.com.nospam) posted:

    Hi,

    I am creating a test, which may or may not cause the application to
    display an error dialogue box. If the dialogue box appears, I would
    like winrunner to issue the button_press() function call so it would
    close the dialogue box. The problem I am having is that if the error
    message does not appear, the script stops with a prompt to indicate
    it cannot find the error dialogue box. Any suggestions as to how to
    do this please?

    if (win_exists ("Error", 10) == E_OK)
    {
    set_window ("Error", 9);
    button_press("OK");
    }

    Regards,

    Michael



  2. #2
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: question about win_exists() function

    User Shivaprakash GK (GK.Shivaprakash@blr.spcnl.co.in.nospam) posted:

    ------_=_NextPart_001_01C144B1.0C5016C0
    Content-Type: text/plain;
    charset="iso-8859-1"

    Hi,
    I think u have not set "Run in batch mode" in General options!!!
    U can set it on & then try...

    Best of luck..

    Cheers,
    Shiva


  3. #3
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: question about win_exists() function

    User (david_burke@dmr.com.au.nospam) posted:


    Hi there,

    I have not seen this occur and I use this function alot.

    Perhaps you could modify it to the following.


    if ( win_exists ( "Error" , 10 ) == E_OK )
    {
    set_window ("Error", 9);
    button_press("OK");
    }
    else # do nothing
    {
    }

    Perhaps the else will overide what it is doing now!!

    Dave

  4. #4
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: question about win_exists() function

    User (MichaelKatsilis@hotmail.com.nospam) posted:

    Hi Shiva,

    Excellent, thank you. I appreciate that.

    Regards,

    Michael

    --- In winrunner@y..., Shivaprakash GK <GK.Shivaprakash@b...> wrote:
    would
    error
    M=210544.1579876.3135161.1261774/D=egroupmai
    message
    program
    address in



  5. #5
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: question about win_exists() function

    User (girish@magicsoftware.com.nospam) posted:
    Hi,

    I feel this is not proper answer or solution for this problem.....
    Because when U set "Run In Batch Mode" then u can not see the error message
    popup while running.


    The proper way to fix this problem is :-
    1. See the window u capture is currect (i.e. 'error' window is
    not in the GUI MAP).
    2. Or the captured window ( 'error' window) is not properly
    captured in GUI MAP.


    Regards
    Girish-T

    MichaelKatsilis@h
    otmail.com To: winrunner@yahoogroups.com
    cc:
    09/24/01 12:11 PM Subject: [winrunner] Re: question about win_exists() function
    Please respond to
    winrunner



    Hi Shiva,

    Excellent, thank you. I appreciate that.

    Regards,

    Michael

    --- In winrunner@y..., Shivaprakash GK <GK.Shivaprakash@b...> wrote:
    would
    error
    M=210544.1579876.3135161.1261774/D=egroupmai
    message
    program
    address in

  6. #6
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: question about win_exists() function

    User (girish@magicsoftware.com.nospam) posted:
    Hi,

    I feel this is not proper answer or solution for this problem.....
    Because when U set "Run In Batch Mode" then u can not see the error message
    popup while running.


    The proper way to fix this problem is :-
    1. See the window u capture is currect (i.e. 'error' window is
    not in the GUI MAP).
    2. Or the captured window ( 'error' window) is not properly
    captured in GUI MAP.


    Regards
    Girish-T

    MichaelKatsilis@h
    otmail.com To: winrunner@yahoogroups.com
    cc:
    09/24/01 12:11 PM Subject: [winrunner] Re: question about win_exists() function
    Please respond to
    winrunner



    Hi Shiva,

    Excellent, thank you. I appreciate that.

    Regards,

    Michael

    --- In winrunner@y..., Shivaprakash GK <GK.Shivaprakash@b...> wrote:
    would
    error
    M=210544.1579876.3135161.1261774/D=egroupmai
    message
    program
    address in

  7. #7
    Senior Member
    Join Date
    Jun 2001
    Location
    Atlanta, GA
    Posts
    1,046
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: question about win_exists() function

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by WinRunner:
    User (girish@magicsoftware.com.nospam) posted:
    Hi,

    I feel this is not proper answer or solution for this problem.....
    Because when U set "Run In Batch Mode" then u can not see the error message
    popup while running.


    The proper way to fix this problem is :-
    1. See the window u capture is currect (i.e. 'error' window is
    not in the GUI MAP).
    2. Or the captured window ( 'error' window) is not properly
    captured in GUI MAP.


    Regards
    Girish-T
    <HR></BLOCKQUOTE>

    I agree. Running the script in Batch Mode is not a solution. It is a work around. I have never used win_exists() but I have used obj_exists() for those security boxes (the exception handler does not always catch them for some reason), and I have had no problems. Perhaps you should try that. Not sure if it will work but its worth a shot. Also have you tried Mercury's CSO.



    ------------------
    Doug
    I figure if you have the courage to get out of bed in the morning, then how bad can the day be.

    Doug

  8. #8
    Junior Member
    Join Date
    Dec 2001
    Location
    CA, USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: question about win_exists() function

    Exception handling is the best way to handle popup events. Check it out in the help files. We are a Delphi shop, and our developers have the ability to pop up a dialog with a single line of code. I get a ton of boxes titled 'Information' or 'Confirm'. Some of them are even called 'Error'. What I have done is defined exceptions so that any time one of these boxes comes up it is handled.

    If you add some savvy to your exception handling, you can actually set up your scripts so they report the response to a dialog box to your report at the end. look up 'define_popup_exception' in the help files.


    Enjoy!

    W.

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

  9. #9
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: question about win_exists() function

    User =?iso-8859-1?q?Sankara=20Narayanan?= (narayanan_sss@yahoo.co.uk.nospam) posted:

    Hello Everybody,

    Syntax for win_exists is


    This statement, ideally, should check for the
    existence of the the window till timout seconds. But,
    here Iam getting this statement checking for the
    existence of the windows till the time that is
    specified against "Timeout for checkpoints and CS
    statements" in the Run tab of General Options window.
    Is it real? Or this is a Bug in WR??

    With Regards,
    Sankara,
    The Police Dog.

    __________________________________________________ _________
    Sent by ePrompter, the premier email notification
    software.
    Free download at http://www.ePrompter.com.

    __________________________________________________

  10. #10
    Member
    Join Date
    Mar 2002
    Location
    Kanchipuram,Tamilnadu,India
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: question about win_exists() function

    User Venkatesan Kuberan (it_venkat@rediffmail.com.nospam) posted:


    hi,

    Sankara Narayanan posted :


    answer:
    win_exists(<windowlogicalname>, <timeout>);

    WR will wait for the existence of the window up to
    <timeout> + "Timeout for checkpoints and CS
    statements" in the Run tab of General Options window.

    Thanks & regards
    venkatesh


 

 
Page 1 of 2 12 LastLast

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 12:36 AM.

Copyright BetaSoft Inc.