When you run a test or component, your application may not always respond with the same speed.
For example, it might take a few seconds:
for a progress bar to reach 100%
for a status message to appear
for a button to become enabled
for a window or pop-up message to open
You can handle these anticipated timing problems by synchronizing your test or component to ensure that QTP waits until your application is ready before performing a certain step.
5.1 Add synchronization steps
Several ways to add synchronization step:
You can insert a synchronization point, which instructs QTP to pause the test or component until an object property achieves the value you specify. When you insert a synchronization point into your test or component, QTP generates a Waitproperty statement in the Expert View. For more information, please consult the QTP Help on "Creating Synchronization Points."
You can insert Exist or Wait statements that instruct QTP to wait until an object exists or to wait a specified amount of time before continuing the test or component. For more information, please consult the QTP Help on "Adding Exist and Wait Statements."
5.2 Global synchronization Settings
Several ways to change global settings:
When working with tests, to modify the maximum amount of time that QTP waits for an object to appear, change the Object Synchronization Timeout in the
Test => Settings => Run tab.
Note: The object synchronization timeout for a component is always 20 seconds (20000 milliseconds).
To modify the amount of time that QTP waits for a Web page to load, change the Browser Navigation Timeout in the
Test =>Settings =>Web tab
or
Business Component => Settings => Web tab
No comments:
Post a Comment