Qtp has three modes:
1. Normal recording: identifies the objects of the tested software to operate the tested software. This is the most commonly used method, because this mode can make the automated code more readable, and the code maintainability is also good, the most important thing is portability, because the object will not change once the software under test is determined. The Code maintenance intensity is basically similar to the development and modification code intensity.
However, sometimes it is not possible to simply use this method. For example, the test case "you can drag and drop books on the bookshelf page" is not easy to use keyword. Next let's take a look at analog recording.
2. Analog recording: accurately records mouse movement and keyboard operations to operate the tested software. If you only need to record in the software under test, we choose relative and custom windows to record the operations outside the window. Otherwise, we choose relative and screen recording. Analog recording cannot be modified in qtp after recording steps. Because the recording result of analog recording is saved in a separate data file. We can only see a runanalog statement in the qtp code.
If you want to verify that a widget of the software is in a certain position. What should we do? Normal recording can only check whether this record exists, but cannot check the specific position of the control.
3. Low Level recording: recognizes all objects as windows or winobjects to operate the tested software. The operations are as follows:
Window test objects-click, dblclick, drag, drop, Type
Winobject test object-click, dblclick, drag, drop, type, activate, minimize, restore, maximize
Low level recording accurately records operations such as click coordinates, which is why low level recording can be used to verify a control at a certain position, however, do not use low level recording if it is not required for verification, because this recording method will make the automated code difficult to maintain, and it is difficult to adapt to any modifications to the software.