Tuesday, February 22, 2011

What is Synchronization

Some time running application may not always respond with the same speed. Sometime due to server slow process your response will get late. How to handle such type of situation?

With the use of Synchronization concept in QTP
           
·         Use of Sync property:  You can insert a synchronization point, which tells QTP to pause the test until an object property achieves the value.

E.g. Browser(“x”).page(“y”).webbutton(“z”).sync

  • Use of Wait Statement: You can insert Exist or Wait statements that tell QTP to wait until an object exists or to wait a specified amount of time before continuing the test.
E.g.  
            Wait(10) or Wait // After 10 second, qtp start execution below statement
Browser(“x”).page(“y”).webbutton(“z”).sync

  • Increase timeout time: You can also increase the default timeout settings in the Test Settings and Options dialog boxes in order to tell QTP to allow more time for certain events to occur.
We can set from here File >> Settings >> Run, Increase Object Synchronization timeout limit.

No comments: