Forum Discussion

gagelarsen53's avatar
gagelarsen53
New Contributor
10 years ago

Change TestComplete Recording Action

We are using TestComplete 10.2.9 to record our test cases. We are testing on a windows 7 machine, on an application built in visual studio 2010.

 

Our question, Is there a way to change what TestComplete generates when recording user input other than using namemapping. We have functions written in some libraries, that do the work we want.

 

for example:

  <Xtrings.sj>

      function XMSProcess() {

          return Sys.Process("myProcess");

      }

 

  <testCase.sj>

      //USEUNIT Xtrings

      function myTestCase() {

          Xtrings.XMSProcess().Window(...).Maximize();

      }

 

 

When we record we get

    Sys.Process("myProcess").Window(...).Maximize();

 

Is there a way to cut out the middle man and have test complete just use the functions we have provided? Any help would be much appreciated.

 

 

 

 

 

 

 

2 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    You can run a script from a Keyword Test using the Run Script Routine command.  

     

    Add your script to the Advanced/Script folder in your project.  After that, add Run Script Routine and choose your script and the function that you want to run.  

     

    https://support.smartbear.com/viewarticle/56271

  • NisHera's avatar
    NisHera
    Valued Contributor

    Let me reprase your question ...

    You have your own objects and it's method reposotory and you need to use those in TC recording...correct?
    How does TC know which of your object and methods to be used in recording?

     

    I wonder if there is an easy way..
    But people out there uses there own reposotory(rather than name mapping) to design test.
    You may have to write rather than record test as Marsha said.