Irene
Irene

Reputation: 11

How to start an app with WinAppDriver as an admin

A Desktop application should be started with admin privileges. How to start it for testing with WinAppDriver?

I am doing it with

AppiumOptions options = new AppiumOptions();
options.AddAdditionalCapability("app", UltreonAppId);
options.AddAdditionalCapability("deviceName", "WindowsPC");
options.AddAdditionalCapability("ms:experimental-webdriver", true);

WindowsDriver<WindowsElement> session = new(new Uri(WindowsApplicationDriverUrl), options);

The application is not starting properly because the application should update registries on a start-up, and that can be done only with admin permissions.

Upvotes: 1

Views: 302

Answers (1)

dvd07
dvd07

Reputation: 1

I searched for this question and saw what the solution looked like, hope it helps someone

if you start WinappDriver.exe as admin, then your application will be launched as admin.

If you press shift + right button on winappdriver.exe and choose to run as another user, the application should run as the other user

Upvotes: 0

Related Questions