Tuesday, July 8, 2008

How will you create Synchronization points in QTP?


To insert a synchronization point:

  1. Begin recording your test or component.
  2. Display the screen or page in your application that contains the object for which you want to insert a synchronization point.
  3. Choose Insert > Step > Synchronization Point.
  4. Click the object in your application for which you want to insert a synchronization point. >Click OK.
  5. The Add Synchronization Point dialog box opens.


6. The Property name list contains the test object properties associated with the object. Select the property name you want to use for the synchronization point.
7. Enter the property value for which QuickTest should wait before continuing to the next step in the test or component.
8. Enter the synchronization point timeout (in milliseconds) after which QuickTest should continue to the next step, even if the specified property value was not achieved.
9. Click OK. A WaitProperty step is added to your test or component.

Ex: Window("Flight Reservation").WinObject("Update Done").WaitProperty "visible", 1, 10000

You can enter Exist and/or Wait statements to instruct QuickTest 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 QuickTest to wait a specified amount of time before proceeding to the next step. You can combine these statements within a loop to instruct QuickTest to wait until the object exists before continuing with the test or component.

In general, the amount of time QuickTest 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, by changing the Object Synchronization Timeout in the Test > Settings > Run tab.

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

No comments: