QTP10.com is a new and completely free website that offers help in all the versions of HP QTP (including latest version 10). More importantly, it offers free code for users of HP QuickTest Professioal. This site helps you in learning the basics of QTP and descriptive/advanced programming in (QTP) on various environments like - .Net, Infragistics, Web, Windows, etc.

Note -
This blog is NOT affiliated with HP / Hewlett-Packard in any way. The data/questions come from various sources and we have our own testing questions. I am just another Software Tester like you.

QTP Analog Recording Tutorial

Share This Post -

Sponsored Links:

 

You can switch to Analog Recording mode only while recording. The option is not available while editing.

To record in Analog Recording mode:

  1. If you are not already recording, click the Record button to begin a recording session.

  2. Click the Analog Recording button or select Automation > Analog Recording. The Analog Recording Settings dialog box opens.
    Analog recording settings

  3. Select from the following options:
    • Record relative to the screen. QTP records any mouse movement or keyboard input relative to the coordinates of your screen, regardless of which application(s) are open or which application(s) you specified in the Record and Run Settings dialog box.

      Select Record relative to the screen if you perform your analog operations on objects located within more than one window or if the window itself may move while you are recording your analog operations.

      Note: When you record in Analog Recording mode relative to the screen, the run session will fail if your screen resolution or the screen location on which you recorded your analog steps has changed from the time you recorded.
      The analog tracking continues to record the movement of the mouse until the mouse reaches the QTP screen to turn off Analog Recording or to stop recording. Clicking on the QTP icon in the Windows taskbar is also recorded. This should not affect your test. The mouse movements and clicks on the QTP screen itself are not recorded.

    • Record relative to the following window. QTP records any mouse movement or keyboard input relative to the coordinates of the specified window.

      Select Record relative to the following window if all your operations are performed on objects within the same window and that window does not move during analog recording. This guarantees that the test will run the analog steps in the correct position within the window even if the window's screen location changes after recording.

       

      Note: If you have selected to record in Analog Recording mode relative to a window, any operation performed outside the specified window is not recorded while in Analog Recording mode.

  4. If you choose to Record relative to the following window, click the pointing hand and click anywhere in the window on which you want to record in Analog Recording mode. The title of the window you clicked is displayed in the window title box.

     

  5. Click Start Analog Record.

  6. Perform the operations you want to record in Analog Recording mode.

    All of your keyboard input, mouse movements, and clicks are recorded and saved in an external file. When QTP runs the test, the external data file is called. It tracks every movement and click of the mouse to replicate exactly the operations you recorded.

  7. When you are finished and want to return to normal recording mode, click the Analog Recording button or select Automation > Analog Recording to turn off the option.
  8. If you chose to Record relative to the screen, QuickTest inserts the RunAnalog step for a Desktop item. For example:
    Analog recording-2

     

    The track file called by the RunAnalog method contains all your analog data and is stored with the current action.

    You can use this track file in more than one action in your test, and also in other tests, by saving the action containing the RunAnalog step as a reusable action. A reusable action can be called by other tests or actions.

     

    Note: When entering the RunAnalog method, you must use a valid and existing track file as the method argument.

    Tip: To stop an analog step in the middle of a run session, press Ctrl + Esc, then click Stop in the Testing toolbar.

     

    Tips for Using the Pointing Hand

    • You can hold the left Ctrl key to change the pointing hand to a standard pointer. You can then change the window focus or perform operations in QTP or in your application, such as right-clicking, using the scroll bars, or moving the pointer over an object to display a context menu.

    • If the window containing the object you want to select is partially hidden by another window, hold the pointing hand over the partially hidden window for a few seconds until it comes to the foreground. Then point to and click the required object. You can configure the length of time required to bring a window into the foreground using the General pane of the Options dialog box.

    • If the window containing the object you want to select is fully hidden by another window, or if a dialog box is hidden behind a window, press the left Ctrl key and arrange the windows as needed.

    • If the window containing the object you want to select is minimized, you can display it by holding the left Ctrl key, right-clicking the application in the Windows task bar, and choosing Restore from the context menu.

    • If the object you want to select can be displayed only by performing an event (such as right-clicking or moving the pointer over an object to display a context menu), hold the left Ctrl key. The pointing hand temporarily turns into a standard pointer and you can perform the event. When the object you want to select is displayed, release the left Ctrl key. The pointer becomes a pointing hand again.

    Go back to-> Choosing the QTP Recording Mode