Forum Discussion

rvk_vit's avatar
rvk_vit
New Contributor
6 years ago

Desktop Application automation

There is a desktop application which i am automating. Situation is like that if i open test complete as run as administrator then only objects get identified and script gets recorded but if i open it simply then neither object get identified and script gets recorded. So i run TC as administrator and then recorded the script and then tried to run the same script without opening TC as administrator , this time script got failed showing an error window does not respond. So i am stuck with that while running scripts in batch i wont be opening TC as administrator privileges, So what should i do? Any help !!
  • Hi,

     

    It sounds like your tested application is always starts with administrative privileges. Can you check this?

    TestComplete must be started with the same or higher level of privileges to be able to access other application's internals.

    This is OS but not TestComplete-specific requirement...

     

  • There are many situations where TestComplete/TestExecute needs to be run as adminstrator in order to properly identify objects. This is especially the case when the application being tested also is run with administrator privilege. This should not be a problem when you run the tests in batch.  You just need to make sure that when you run your batch of tests, whatever tool you're using to launch it is launching TC with adminsitrator access.  

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    It sounds like your tested application is always starts with administrative privileges. Can you check this?

    TestComplete must be started with the same or higher level of privileges to be able to access other application's internals.

    This is OS but not TestComplete-specific requirement...

     

    • rvk_vit's avatar
      rvk_vit
      New Contributor

      So in that case if i want to run test complete scripts for this kind of application , how to do it ? If i use test execute to run scripts , does it have any method to open scripts with administrative privileges?

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        You just need to start TestComplete/TestExecute with proper permissions. How to do this depends on how you start the tool. For example, you may create a shortcut with the Run Application As Administrator option set and use this shortcut to start the tool manually.

        You may use RunAs OS command to start the tool with elevated permissions from batch file.

        PowerShell also has a flag to start process with elevated permissions (do not remember it by heart).

        It is possible that CI tool that you are using also has similair functionality.

         

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    There are many situations where TestComplete/TestExecute needs to be run as adminstrator in order to properly identify objects. This is especially the case when the application being tested also is run with administrator privilege. This should not be a problem when you run the tests in batch.  You just need to make sure that when you run your batch of tests, whatever tool you're using to launch it is launching TC with adminsitrator access.