Ask a Question

Desktop Application automation

SOLVED
rvk_vit
New Contributor

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 !!
4 REPLIES 4
AlexKaras
Champion Level 2

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...

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
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.  


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

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?

 

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.

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
cancel
Showing results for 
Search instead for 
Did you mean: