Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Sunday 10 June 2018

What is ReplayType in UFT/QTP...?

ReplayType is QTP Web Add-in setting. It can be used to change how the events are replayed on the browser. There are two modes of ReplayType
  • Events (1) – Replay of events using the Browser methods (something similar to DOM).
  • Mouse (2) – Replay of events using the mouse and keyboard simulation.
When to change ReplayType?
Use of ReplayType can be best explained by a below example. In below sample textbox we need to type in any value and see that the button gets enabled when there some text in the textbox and disabled when there is not text. Click on the button will display the values inside the textbox.

importance:

For few of the objects, though the objects reference available and able to recognize in applications and perform script execution without any issues, it doesn't perform expected action in the application.

Example: There is button in the application Object is available in Object Repository and we are able to highlight it During script execution, it executes without any issue but on clicking button it is able to move to next screen(in fact it is not clicking on button).

In order to handle such issues, UFT has an option use ReplayType which will change the execution with mouse/keyboard control(this means similar to manually taking control with hand), Below line of the script can be used for this.

Setting.WebPackage("ReplayType") = 2
If you want to change it again then below line of script can be used.
Setting.WebPackage("ReplayType") = 1
Example:
Setting.WebPackage("ReplayType") = 2
Browser("google").Page("google").WebEdit("txtReplayType").Set "Knowledge"
Browser("google").Page("google").WebButton("Type and enable me").Click
Setting.WebPackage("ReplayType") = 1

No comments:

Post a Comment

Note: only a member of this blog may post a comment.