Forum Discussion

shineliulu's avatar
shineliulu
Occasional Visitor
8 years ago

TestComplete11 on win 10 can't get Winform Object correctly if TC is not run as Administrator

Dear Community,

 

I'm using Test Complete 11.3 on Win10. Our produce is one typical Winform project with C#.

 

When I'm using Object Spy to get one UI Component, If I didn't run Test Complete as Administrator, then the full name I get from Object Spy is like: 

Sys.Process("Myproduct").Window("WindowsForms10.Window.8.app.0.3551b1b_r6_ad1", "Data Browser", 1).Window("WindowsForms10.Window.8.app.0.3551b1b_r6_ad1", "", 7)....

 

However if I run TC as Administrator, then the full name I get from Object Spy is like this:

Sys.Process("Myproduct").WinFormsObject("myApplication").WinFormsObject("windowDockingArea2").....

 

The second one is the result I expected.

 

Can anybody help to explain me why the result is different? I have disabled the user access control to never notify, so supposely there's no difference between "double click to run test complete" and "right click to run as administrator to run test complete"

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Disabling UAC does not automatically elevate permissions.  There are method accesses and such TC as administrator has that TC as normal user does not. Therefore, running TC as administrator, in some cases, will result in accessing properties of applications differently.  As per the TC help, this is expected, that if accessing properties is problematic, run TC as administrator.