Forum Discussion

awhawh's avatar
awhawh
Contributor
5 years ago
Solved

Unable to find the object that matches the [object] item. when running an application in RunAs mode

Hi,

 

When I run an application in normal 'Run' mode the application I'm running works consistently; however, when I run the application in 'RunAs' mode (I need to test authorisation functionality so need to run the application under a different user account) it doesn't recognise objects previously mapped and recorded in the NameMapping section. I've confirmed this using the object spy and analysing the name mapping

 

I'm at a loss as to how to fix this. I've tried all the suggestions that I can find including ensuring TC is run with administrator priviledges. I even 'RanAs' the same user currently logged into the machine with no success

 

Does anyone have any ideas as to what might me causing this

 

Thanks

 

Adam

  • awhawh's avatar
    awhawh
    5 years ago

    Hi,

     

    Initially it worked when running the test through TestExecute from command line. I decided to launch TestComplete.exe directly from the application bin directory. This also worked.

     

    The problem was running TestComplete from the desktop icon that was created during the installation process

14 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Does the application or objects change in any way with their properties?

    What I would do is compare the properties with regular "Run" with properties of the objects with "Run as" and see where the differences are.  That's probably what's going on.

    • awhawh's avatar
      awhawh
      Contributor

      Thanks for your reply

       

      The noticeable difference is the application launched in RunAs mode has a property of IsOpen = false, where as the application opened in 'Run' mode is set to true

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        It's not so much the application I was talking about... you mention that you have a problem finding an object... what properties change on that object that you're using in your mapping?