Failed to locate opened application
See original GitHub issueHello, Using Robotframework+appiumLibrary and WinAppDriver, I am trying to launch a Windows Desktop app that is made using WinForms but it is consistently giving me a "Failed to locate opened application window with appId: C:/xxx/xxx/installer-win46.exe, and processId: 280. The app launches successfully and displayed on-screen but this message indicated to me that it is unable to get the sessionId and the framework is unable to interact with it. I checked the Task Manager and found the process and processId matching what WinAppDriver claimed that it cannot locate.
It will also fail at the Tear Down step, saying that “No application is open”. Why is it not detecting the app? I saw some other posting about this issue, but they have a workaround for this issue because they are using a full fledged programming language. Is there any workaround for this for Robotframework?
My Robotframework launch script looks like this:
${REMOTE_URL} http://127.0.0.1:4723
${APP} C:/xxx/xxx/installer-win64.exe
Open Application ${REMOTE_URL} platformName=Windows deviceName=mymachine app=${APP} automationName=appium
The below is the Inspect.exe output indicating that the app is a WindowsForm 10 app.
How found: Mouse move (712,398)
hwnd=0x00030694 ??bit class="WindowsForms10.Window.8.app.0.34f5582_r6_ad1" style=0x16C80000 ex=0x50101
ChildId: 0
Interfaces: IEnumVARIANT IOleWindow IAccIdentity
Impl: Local oleacc proxy
AnnotationID: 0100008094060300FEFFFFFF00000000
Name: [null]
Value: "Management Services"
Role: title bar (0x1)
State: focusable (0x100000)
Location: {l:431, t:377, w:468, h:23}
Selection:
Description: "Displays the name of the window and contains controls to manipulate it"
Kbshortcut: [null]
DefAction: [Error: hr=0x80020003 - Member not found.]
Help: [null]
HelpTopic: ""
ChildCount: 5
Window: 0x30694
FirstChild: "Close" : push button : normal
LastChild: "Close" : push button : normal
Next: "Management Services" : client : focusable
Previous: [Error: hr=0x80004005 - Unspecified error]
Left: [Error: hr=0x80004005 - Unspecified error]
Up: [null]
Right: [null]
Down: "Management Services" : client : focusable
IsContentElement: false
Other Props: Object has no additional properties
Children: "IME" : push button : invisible
"Minimize" : push button : invisible
"Maximize" : push button : invisible
"Context help" : push button : invisible
"Close" : push button : normal
Ancestors: "Management Services" : window : moveable,focusable
"Desktop" : client : focusable
"Desktop" : window : focusable
[ No Parent ]
Screenshot:
My environment: Windows 10 x64 Python 2.7.13 WinAppDriver running on Administrator console Robot Framework 3.0.2 AppiumLibrary 1.4.5.4
Thanks for any help/info given.
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (7 by maintainers)
Top GitHub Comments
Latest Update: I am finally able to identify the app using the “Attaching to this application window” technique, in Robotframework.
Here’s the code snippet that worked for me:
Thanks for the info and help!
When I ran the test in debug mode, the desktopSession had the following exceptions :