imsardine / winappdriver

WebDriver for Windows Applications
MIT License
119 stars 11 forks source link

App detection / launch fails after proper installation #12

Closed wilcollins closed 2 years ago

wilcollins commented 9 years ago

image

The driver appears to download and install the app (based on the logs + it is installed on my machine and I can launch the app), but then the driver fails to launch the app saying that it is not installed yet

UPDATE:

With v0.2.1 I get the activation error after a successful installation:

2015-11-18 15:52:31.089 [Information] WinAppDriver: Activate the store app; current working directory = [C:\WINDOWS\SysWOW64], AppUserModelID = [a02b50fe-bb55-4be5-8bd9-6c2f93cef175_vr9ykqv283qqw!App].
2015-11-18 15:52:31.111 [Error] WinAppDriver: Error occurred.
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at WinAppDriver.Modern.StoreApp.Activate() in z:\work\winappdriver\src\WinAppDriver\Modern\StoreApp.cs:line 128
   at WinAppDriver.Handlers.NewSessionHandler.Handle(Dictionary`2 urlParams, String body, ISession& session) in z:\work\winappdriver\src\WinAppDriver\Handlers\NewSessionHandler.cs:line 159
   at WinAppDriver.RequestManager.Handle(String method, String path, String body, ISession& session) in z:\work\winappdriver\src\WinAppDriver\RequestManager.cs:line 48
   at WinAppDriver.Server.HandleRequest(HttpListenerRequest request, HttpListenerResponse response) in z:\work\winappdriver\src\WinAppDriver\Server.cs:line 47
2015-11-18 15:52:31.141 [Verbose] WinAppDriver: Response (Status: BadRequest, ContentType: text/plain):
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnost
wilcollins commented 9 years ago

@imsardine Any idea why the app detection fails after installation?

imsardine commented 9 years ago

@wilcollins I could not reproduce the error using revision 2146557 (v0.1). The error indicates that the package name WorkTaskManagement could not be found in the list of installed apps.

I'm afraid that the package name you provided is not correct, so could you help to confirm it by querying install apps manually with the help of PowerShell cmdlet Get-AppxPackage. For example:

PS C:\> foreach ($app in Get-AppxPackage) { $app.Name }
Microsoft.VCLibs.120.00
Microsoft.VCLibs.120.00
...
winstore
Facebook.Facebook

Where you can find the package name of FB store app is Facebook.Facebook

wilcollins commented 9 years ago

@imsardine It is not displayed in the list of app package names (and I'm not sure what package the hashed values correspond to) image

but it is installed? image

imsardine commented 9 years ago

@wilcollins I think one of the hash value (89f2017f-... or b7cd92eb-...) is the package name of your app WorkTaskManagement.

wilcollins commented 9 years ago

@imsardine one of the hashed values is the WorkTaskManagement app: image

any idea how to preserve the app package name?

wilcollins commented 9 years ago

Now it fails to activate after installing: image

imsardine commented 9 years ago

@wilcollins You can declare the package name in the package manifest, for example:

<Identity Name="IBM.WorkTaskManagement" .../>

For more details, please refer to How to find the package name of an app?.

wilcollins commented 9 years ago

@imsardine yea that would work -- I thought winappdriver was generating a random hash at runtime

imsardine commented 9 years ago

@wilcollins You can check out the latest release v0.2, and kindly let me know if it works for you.

imsardine commented 9 years ago

@wilcollins The latest error you reported is the same to the error reported in #17. Please check out v0.2.1 and try it out.

wilcollins commented 8 years ago

With v0.2.1 I still get the activation error after a successful installation:

2015-11-18 15:52:31.089 [Information] WinAppDriver: Activate the store app; current working directory = [C:\WINDOWS\SysWOW64], AppUserModelID = [a02b50fe-bb55-4be5-8bd9-6c2f93cef175_vr9ykqv283qqw!App].
2015-11-18 15:52:31.111 [Error] WinAppDriver: Error occurred.
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at WinAppDriver.Modern.StoreApp.Activate() in z:\work\winappdriver\src\WinAppDriver\Modern\StoreApp.cs:line 128
   at WinAppDriver.Handlers.NewSessionHandler.Handle(Dictionary`2 urlParams, String body, ISession& session) in z:\work\winappdriver\src\WinAppDriver\Handlers\NewSessionHandler.cs:line 159
   at WinAppDriver.RequestManager.Handle(String method, String path, String body, ISession& session) in z:\work\winappdriver\src\WinAppDriver\RequestManager.cs:line 48
   at WinAppDriver.Server.HandleRequest(HttpListenerRequest request, HttpListenerResponse response) in z:\work\winappdriver\src\WinAppDriver\Server.cs:line 47
2015-11-18 15:52:31.141 [Verbose] WinAppDriver: Response (Status: BadRequest, ContentType: text/plain):
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnost