Forum Discussion

lucieneven's avatar
lucieneven
Contributor
13 years ago

how to record the script from the cursor

Hello,



I'm a novice to TestComplete. Here i have a generic question, how to record the test script from the cursor.



For some reason, quite often i see the "object not found" error. In QTP,
it's easy to handle, user can either add the test from the cursor
(breakpoint) or add object to repository. However, i tried TestComplete,
as can be seen from screenshot, TestComplete will always create another
new sub test.



sub test is useful for some case, but here, what i want to do is only
add some lines from the cursor, instead of redefine all the variable
from the scratch.



I checked the project properties, and didn't find any configuration.



So could anyone shed some light here? I do appreciate that!



Lucien

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    This is a configuration option in TestComplete.



    Go to Tools | Options | Engines | Recording.  There is an option to "Always start a new test" (see screenshot).  Turn that off



    Now, if you have your cursor inside a routine and hit "Record", it will record and insert at your cursor.  If you have your cursor outside a routine, it will create a new routine and put your recording in there.
  • Hello Robert,



    It works. Thanks for your quick help. One more question here, as can be seen from enclosed pic 2011-11-29 3-42-47 PM.png, if i wanted to continue to record based on existed explorer, what i can do.



    During my test based on IE explorer, as can be seen from 2011-11-29 3-15-05 PM.png, before the jump, i already set the Page URL.



    Now my problem is, i can record a new test from the curson, but it will invoke another explorer from the scratch. Indeed, i wanted to go ahead from the breakpoint.



    Please advise here, thank you so much!!



    Lucien












  • Hi Lucien,


    TestComplete launches a new application instance, because the application's Autorun setting is enabled. This setting lets you specify whether TestComplete should automatically launch the application when you start the recording.


    To disable the setting, do any of the following:


    * Go to the TestedApps editor and disable the check box in the Autorun column.

    * Use the TestedApp.AutorunOnRecording property in your test.