cancel
Showing results for 
Search instead for 
Did you mean: 

[TestLeft] - Object Tree view disappears when running the application with another user

Highlighted
New Contributor

[TestLeft] - Object Tree view disappears when running the application with another user

 

 

Hi,

 

I'm writing automated tests for a WPF application, and I have some issues when I run my test with another user (using the RunAs method). As soon as I launch the application, TestLeft doesn't seem to detect any object any more, nor can I see any object in the tree view.

 

When I run the automated tests with my local user (OK):

public PageObject StartApplication()
        {
            Process = Driver.Applications.Run("PathToApplication.exe");
            Driver.Log.Message("Starting Application");
            return new PageObject(Driver, Process);
        }

20190709_OK_Example.png

 

When I run my tests with another user (NOK):

public PageObject StartApplication()
        {
            Process = Driver.Applications.RunAs("PathToApplication.exe"", "User", "Password");
            Driver.Log.Message("Starting Application");
            return new PageObject(Driver, Process);
        }

20190709_NOK_Example.png

 

The result is, my automated tests won't find any object so will eventually go into a timeout.
Allthough not one control is visible in the object tree view, I still can manually interact with the application under test.

 

Regards,

Lorenz

3 REPLIES 3
Community Hero

Re: [TestLeft] - Object Tree view disappears when running the application with another user

Hi Lorenz,

 

Permissions problem?

In order to access tested application (TA) internals, TestLeft must be running with the same or higher level of permissions. Thus, if you (and TestLeft process) is a regular user but your TA is StartedAs the user with administrative permissions, TestLeft will not be able to access TA's internals.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Contributor

Re: [TestLeft] - Object Tree view disappears when running the application with another user

Thanks AlexKaras for your reply.

 

I tried following without success:

  1. Launch TestExecute as administrator.
  2. the admin is granted default Access Permissions by following these steps:
    https://support.smartbear.com/testcomplete/docs/testing-with/tested-apps/desktop/run-modes/run-as/se...

Any other suggestions?

 

Lorenz

Community Hero

Re: [TestLeft] - Object Tree view disappears when running the application with another user

Hi Lorenz,

 

Launch TestExecute as administrator.

According to my knowledge, you should not explicitly start TestExecute when starting TestLeft tests. TestExecute is started implicitly by the test runtime (MSTest, NUnit, etc.). So I think that you should start your test execution runtime with administrative permissions. http://support.smartbear.com/testleft/docs/using/running-tests/index.html might be useful.

If the above does not help, contact Support directly via the https://support.smartbear.com/message/?prod=TestLeft form.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Update to TestLeft 2.3
Labels
Join the September Hub-bub to show off, learn and win