SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Jan 2002
    Location
    Roseville, CA, USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Waiting for focus...

    In Silktest 5.01 - is there a predefined function that makes the test-script wait for focus to return to a specific window or control? If not, what is the best way to create a method to make this happen?

    The only thing I could think to do would be to put VerifyFocus() in a loop that ends when it finally returns "True". This seems a little risky to me though. It's hard to determine how long the object will have to wait to receive focus back, because a database is being created. Some machines may take a few minutes to create the database, while the faster ones may take just over one minute.

    Any ideas?

    ------------------
    Cyndee
    Cyndee

  2. #2
    Junior Member
    Join Date
    Jan 2002
    Location
    Roseville, CA, USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Waiting for focus...

    Hi mandar!

    Exists() is the function I'm currently using, however, because I wasn't sure what the timeout setting would be, I needed something that would recognize that focus had returned to the control.

    Thanks though!

    Originally posted by mandar:
    there is a function called Exists().

    The sysntax is
    bDoesExist = window.Exists ([nTimeout])

    Check help.....

    [/QUOTE]



    ------------------
    Cyndee
    Cyndee

  3. #3
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Waiting for focus...

    I know of no wait for focus routine built in, but you could certainly write one.

    This may need massaged. It's just off the top of my head, but should give you a direction to go with it.

    You might even want to nest the while loop in a do/except so that if it times out at 5 minutes you can handle that exception.

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


    [This message has been edited by DJGray (edited 03-12-2002).]

  4. #4
    Junior Member
    Join Date
    Jan 2002
    Location
    Roseville, CA, USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Waiting for focus...

    Okay thanks DJ!

    That gives me a great start, and makes a lot more sense than what I was trying to do...

    Thanks again!

    ------------------
    Cyndee
    Cyndee

  5. #5
    Member
    Join Date
    Aug 2001
    Location
    Burlington MA USA
    Posts
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Waiting for focus...

    there is a function called Exists().

    The sysntax is
    bDoesExist = window.Exists ([nTimeout])

    Check help.....

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

  6. #6
    Member
    Join Date
    Aug 2001
    Location
    Burlington MA USA
    Posts
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Waiting for focus...

    Hi cyndee,

    As far as I know, you can put a big value as nTimeout, say 100 units or so, exists does not wait for that period of time, if your window is activated in 10 units, it will return true, if the window does not get activated in 100 units, it will return false.

    I guess this would help you....



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

  7. #7
    Junior Member
    Join Date
    Jan 2002
    Location
    Roseville, CA, USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Waiting for focus...

    Thanks Mandar,

    Every bit of information I get does help tremendously!


    ------------------
    Cyndee
    Cyndee

  8. #8
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Waiting for focus...

    Check out:
    AmeliorTech.com

    for some functions that can help out here.

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  9. #9
    Junior Member
    Join Date
    Jan 2002
    Location
    Roseville, CA, USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Waiting for focus...

    James,

    Good! Great site!!!

    Thanks


    ------------------
    Cyndee
    Cyndee

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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:14 PM.

Copyright BetaSoft Inc.