Forum Discussion

huabing's avatar
huabing
Occasional Contributor
4 months ago
Solved

can not identify prompt by using Object Spy

run Edge as manager(administrator) role can identify prompt by Object Spy, but run Edge as sysoptest(administrator) role can not identify prompt( can identify normal elements), how to solve this? co...
  • scot1967's avatar
    4 months ago

    TC needs to be 'run as administrator' to properly access objects for identification.  The access level of the current user can be different.  You may need to check with your IT department to enable this.  If you are logging into the test computer as different users with different access levels this could be causing the problem.

    https://support.smartbear.com/testcomplete/docs/general-info/configuring/testing-under-admin-account.html?sbsearch=Run%20as%20administrator

    TestComplete will run a web browser with the same privilege level it is assigned.  To launch a browser as a different user you could script a call to start your browser.  As you have found, testing with different privilege levels can be problematic and even unstable at times.   I hope this helps!  

    WshShell = Sys.OleObject("WScript.Shell");
    WshShell.Run("runas /user:StandardUser \"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe\"");
    // Or...
    WshShell.Run("runas /user:StandardUser \"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe https://your-web-app.com\"");