Why & How to use Wait for Object in TruClient Protocol - Loadrunner

Why to use Wait for Object?

I would suggest using Wait for Object function over normal Wait. TruClient protocol is asynchronous in nature which means that steps do not depend on each other during execution. In this case if we use a normal Wait function defined in seconds and if the step takes more time to complete than the time defined in the Wait function then the next step will fail since it will be unable to find the object.
To overcome this we must use Wait for Object function which will wait till a particular object loads in the page and this avoids the failing of subsequent steps.

How to use Wait for Object?

Step 1: Goto Toolbox --> Functions --> Wait for Object and place it below the desired step.


Step 2: Click Click to Choose and Object and select an object from the page. Following which the Highlighted Object details popup open showing the object match in Green.




Step 3: Goto Step --> End Event and change the end event from Automatic: Action Completed to Object Exists


Step 4: Click the search icon and select the same object chosen in Step 2. Following which Highlighted Object details popup open showing the object match in Green similar to that of Step 2.



Thats it !! Your Wait for Object Step is completed.




No comments:

Post a Comment