WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

How to launch Microsoft Click-Once application

Open randikaf opened this issue 9 years ago • 3 comments

Is there a way to launch an application which bundle with Microsoft Click-Once directly using WinAppDriver (Without directly invoking the .exe)?

randikaf avatar Aug 25 '17 07:08 randikaf

Hi @randikaf,

Could you share what happens when you pass the full path of the link or appref-ms file in the app capability?

timotiusmargo avatar Aug 28 '17 23:08 timotiusmargo

I have a similar issue; when I try to invoke a application of appref-ms file, it throws error

HTTP/1.1 500 Internal Error Content-Length: 297 Content-Type: application/json {"status":13,"value":{"error":"unknown error","message":"Failed to locate opened application window with appId: C:\\Client.appref-ms, and processId: 25984"}} Application is opened but fails to create session. Below is the code DesiredCapabilities appCapabilities = new DesiredCapabilities(); appCapabilities.SetCapability("app", GetApplicationPath("AppPath")); appCapabilities.SetCapability("deviceName", "WindowsPC"); Session = new WindowsDriver(new Uri(WindowsApplicationDriverUrl), appCapabilities);

Regards, Mahendra

Manvibha avatar Aug 29 '17 04:08 Manvibha

When an appref-ms reference file is specified instead of the link or the executable in the app capability, your application will be launched through system rundll32.exe process. In such case, there’s no practical way for the WinAppDriver to identify the right process id or application window belonging to your application.

I would recommend using the link file or the executable directly if possible. However, if launching using appref-ms reference is the only option for your scenario, you can locate the launched window using a desktop session and create a new session by attaching to the window you found.

timotiusmargo avatar Sep 05 '17 20:09 timotiusmargo