Adding Exist/Wait Statements and Modifying Timeout Values in QTP Tool in Testing

You can enter Exist and/or Wait statements to instruct Quick Test to wait for a window to open or an object to appear. Exist statements return a Boolean value indicating whether or not an object currently exists. Wait statements instruct Quick Test to wait a specified amount of time before proceeding to the next step. You can combine these statements within a loop to instruct Quick Test to wait until the object exists before continuing with the test or component:

Clipboard01.jpg

Modifying Timeout Values

If you find that in general the amount of time Quick Test waits for objects to appear or for a browser to navigate to a specified page is insufficient you can increase the default object synchronization timeout values for your test and the browser navigation timeout values for your test:

Clipboard02.jpg

Alternatively if you insert synchronization points and Exist and Wait statements for the specific areas in your test or component you want Quick Test to wait a longer time for an event to occur, you may want to decrease the default timeouts for the rest of your test or component:

Clipboard03.jpg

When working with tests, to modify the maximum amount of time that Quick Test waits for an object to appear, change the Object Synchronization Timeout in the File > Settings > Run tab:

Clipboard04.jpg

To modify the amount of time that Quick Test waits for a web page to load, change the Browser Navigation Timeout in the File > Settings > Web tab:

Clipboard05.jpg




Similar Articles