SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Waiting for program to catch up....

    I am testing a VB application and being that vb is not the quickest horse in the field, i find that i have to [Sleep] the testcase many times, which i find is slower than acutually testing it by hand. Is there a way to check if a form has been loaded, and if it not loaded yet, keep checking until it is loaded. If anyone has any suggestions please fill me in....


    below is a baisic example of what i am trying to accomplish....

    [-] for each sForm in lsForms
    [ ] // Open the form from the list...
    [ ] OpenReturn(sForm)
    [ ] // stop the process...
    [ ] sleep(8)
    [ ] // Save the return...
    [ ] Return.Save(sForm)
    [ ] sleep(6)
    [ ] // Close the return...
    [ ] Return.Close()
    [ ] sleep(3)
    [ ] ReturnManager.Show()
    [ ]


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


    [This message has been edited by RCyr (edited 01-28-2003).]
    N+ CNA

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Waiting for program to catch up....

    use the .Exists(8) method. It will wait a maximum of 8 seconds or whatever value you pass. If it shows up prior, it will then continue on.

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  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 program to catch up....

    Try something like this.

    This way, once your expected page returns, you can move on, otherwise you have to wait the entire sleep time even though your app returned after 2 seconds. You waste a lot of sleep time when you can move on.

    Does this make sense?

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

  4. #4
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Waiting for program to catch up....

    Yes i think that will help me thanks for the input....

    ------------------
    N+ CNA

  5. #5
    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 program to catch up....

    Try creating 2 functions: WaitFor and WaitGone. The can help out in situations like this. You can download these functions at:

    AmeliorTech.com

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

    [This message has been edited by jamesso (edited 01-28-2003).]

 

 

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 02:38 PM.

Copyright BetaSoft Inc.