SPONSORS:






User Tag List

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

    Timing for TP to execute next statement ?

    Sometimes, after executing the first statement to open a web page or window, TP executes the next statement to try to manipulate a control on the web page immediately. If network traffic is heavy, it may take a while to open the web page. Test will fail because the control canít be found before the page opens. I have to add Sleep to delay execution of next statement to avoid this problem.

    In other times, TP obviously waits for the web page to open, then execute the next statement.

    What is the mechanism behind the scene? How can I predict it before it occurs?

  2. #2
    Senior Member
    Join Date
    Jan 2006
    Location
    Bengaluru
    Posts
    494
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Timing for TP to execute next statement ?

    Use Wait method.
    Check the TP help on how to create Events and how to use Wait method.
    Suraj

  3. #3
    Junior Member
    Join Date
    Jun 2007
    Location
    PA
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Timing for TP to execute next statement ?

    If you are using a Visual Test, Select the Step that comes before the step that errors out. Right click and select insert then select Delay and Timing. Select Delay, this will insert a new step. Now set a delay time in the properties section of the Step. This will allow the page to fully load and not display an attach error.

  4. #4
    Junior Member
    Join Date
    Jul 2007
    Location
    In the Matrix
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Timing for TP to execute next statement ?

    If you use delays, pause, sleep, etc, you will just be guessing how long it will take, or if you add a long delay, it will just slow down your application. We've found wait events to be the best option. You can set the event for the longest time you expect the page to take to load before failing the test, and if it loads faster, it will just keep running the script.
    If all else fails...blame it on the testers.

  5. #5
    Senior Member
    Join Date
    Sep 2001
    Location
    Philly
    Posts
    1,231
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Timing for TP to execute next statement ?


    The first (and most simple) thing you want to look at is the playback setting for "Attach Time Out". This is set to 10 seconds by default, which means TP will wait up till 10 seconds for each object to appear. Changing this value to 30 (for example) will not slow down your test, but just allow each step to wait UNTIL 30 seconds before creating and error.

    You can also set this value in the script using:

    playback.AttachTimeOut = 30
    ~Alias~

  6. #6
    Senior Member
    Join Date
    Apr 2003
    Location
    Wisconsin, USA
    Posts
    5,338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Timing for TP to execute next statement ?

    You can also set playback.BrowserInteractiveTimeOut = -1, which will make TP wait until an IE window is interactive before it will continue.

    However, that setting only works for IE windows, so if your app doesn't run under a browser, the setting won't help.

 

 

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 8.82%
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 03:09 PM.

Copyright BetaSoft Inc.