Can I turn off the sync feature for web testing?
The problem I am having is QTP is waiting for the page to load (without having a sync statement). This is causing the problem because the popup text that I am looking for disappears when the page finishes loading. Is there anyway to force QTP to run the next line without waiting for the page to finish loading?
Re: Can I turn off the sync feature for web testing?
You can reduce the Object Synchronisation Timeout parameter, default is 20000 miliseconds.
This will solve that problem but may mean where you need to wait for a page to render elsewhere in the scrip it won't wait and test may fail.
I set the sync timeout to 2000 and use Exist or WaitProperty methods if I need to wait for a particular event.
Re: Can I turn off the sync feature for web testin
To dynamically change Object Sync timeout, "do some stuff..." and then restore Object Sync timeout, use some variation of the following code snippet:
<font class="small">Code:</font><hr /><pre>
Dim iMS, iDefault, reporterMode
On Error Resume Next 'Ignore (or trap if you want) any exceptions...
Reporter.Filter=rfDisableAll 'disable QTP logging (you might not want to do this...)
iDefault=Setting("DefaultTimeout") 'save existing Object Sync timeout
Setting("DefaultTimeout")=iMS 'reduce timeout to iMS milleseconds
' your specific code goes here...
Setting("DefaultTimeout")=iDefault 'restore Object Sync Timeout
Reporter.Filter=reporterMode 'restore QTP logging
On Error Goto 0 'back to QTP handling exceptions
-Hope this helps, Terry