Forum Discussion

rafall92's avatar
rafall92
Occasional Contributor
4 years ago

Test application using non-admin user

Hi 
I have a problem while i'm testing application run under non admin user. The problem is : I don't have access to many of properties of app parts e.g I cannot catch button, or text with spy tool.  It works, when I run app with same user as Test Complete. How can I solve it? I want to run TC as current windows user (Admin) and my aplication as regular user.

In Component Repository admin user have full rights. The same is in windows settings. UAC is disabled

  • ApplePen's avatar
    ApplePen
    Community Leader

    Sometimes TC cannot spy all objects directly.

    If TC cannot do it nowadays, maybe we need to communicate with developer about which method/how to control it by other api.

    Like the fake code below.

    WindowName.Edit.WrapperObject().SetText(u'text')

     

  • ApplePen's avatar
    ApplePen
    Community Leader

    I guess the RunAs method will help you.

    It will run the test application with specific user.

    • rafall92's avatar
      rafall92
      Occasional Contributor

      But It does not solve my problem. I know how to run app with specific user. I cannot catch many of object if I use app with different user than TC. If i run both apps with admin user, I don't have any problem, and can catch almost  everything (buttons, textboxes, labels etc) but If I use different user to run app (user have restricted rights) I can catch only main window and nothing else. I don't see many of properties also

      • rafall92's avatar
        rafall92
        Occasional Contributor

        Also when I run app ass different user, class of window changed from HwndSource to HwndWrapper. With current loggon user is ok