Deal with the 'Dogtail: warning: application may be hanging' bug
When that warning is displayed in the debug logs of dogtail it often means that dogtail will fail. See this log (taken from #10721-note_11):
[...]
calling as amnesia: mktemp
call returned: [0, "/tmp/tmp.kg0NHEhCeZ\n", ""]
calling as root: rm -f '/tmp/tmp.kg0NHEhCeZ'
call returned: [0, "", ""]
calling as amnesia: echo '#!/usr/bin/python
from dogtail import tree
from dogtail.config import config
config.searchShowingOnly = True
application = tree.root.application('"'"'gedit'"'"')
application.button('"'"'New'"'"').click()' >> '/tmp/tmp.kg0NHEhCeZ'
call returned: [0, "", ""]
calling as amnesia: /usr/bin/python '/tmp/tmp.kg0NHEhCeZ'
call returned: [0, "Creating logfile at /tmp/dogtail-amnesia/logs/tmp.kg0NHEhCeZ_20160425-195535_debug ...\nDogtail: warning: application may be hanging\nClicking on [push button | New]\nMouse button 1 click at (207,70)\n", ""]
calling as root: rm -f '/tmp/tmp.kg0NHEhCeZ'
call returned: [0, "", ""]
calling as amnesia: mktemp
call returned: [0, "/tmp/tmp.qHGZBlkVKv\n", ""]
calling as root: rm -f '/tmp/tmp.qHGZBlkVKv'
call returned: [0, "", ""]
calling as amnesia: echo '#!/usr/bin/python
from dogtail import tree
from dogtail.config import config
config.searchShowingOnly = True
application = tree.root.application('"'"'gedit'"'"')
application.child(roleName='"'"'text'"'"').click(button=3)' >> '/tmp/tmp.qHGZBlkVKv'
call returned: [0, "", ""]
calling as amnesia: /usr/bin/python '/tmp/tmp.qHGZBlkVKv'
call returned: [0, "Creating logfile at /tmp/dogtail-amnesia/logs/tmp.qHGZBlkVKv_20160425-195556_debug ...\nDogtail: warning: application may be hanging\nClicking on [text | ]\nMouse button 3 click at (511,399)\n", ""]
calling as root: rm -f '/tmp/tmp.qHGZBlkVKv'
call returned: [0, "", ""]
calling as amnesia: mktemp
call returned: [0, "/tmp/tmp.dBE66obICt\n", ""]
calling as root: rm -f '/tmp/tmp.dBE66obICt'
call returned: [0, "", ""]
calling as amnesia: echo '#!/usr/bin/python
from dogtail import tree
from dogtail.config import config
config.searchShowingOnly = True
application = tree.root.application('"'"'gedit'"'"')
application.menuItem('"'"'Paste'"'"').click()' >> '/tmp/tmp.dBE66obICt'
call returned: [0, "", ""]
calling as amnesia: /usr/bin/python '/tmp/tmp.dBE66obICt'
call returned: [1, "Creating logfile at /tmp/dogtail-amnesia/logs/tmp.dBE66obICt_20160425-195618_debug ...\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 3)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 4)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 5)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 6)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 7)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 8)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 9)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 10)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 11)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 12)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 13)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 14)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 15)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 16)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 17)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 18)\nsearching for descendent of [application | gedit]: \"Paste\" menuitem (attempt 19)\nTraceback (most recent call last):\n File \"/tmp/tmp.dBE66obICt\", line 6, in <module>\n application.menuItem('Paste').click()\n File \"/usr/lib/python2.7/dist-packages/dogtail/tree.py\", line 1008, in menuItem\n return self.findChild(predicate.IsAMenuItemNamed(menuItemName=menuItemName), recursive, showingOnly=showingOnly)\n File \"/usr/lib/python2.7/dist-packages/dogtail/tree.py\", line 897, in findChild\n raise SearchError(describeSearch(self, pred, recursive, debugName))\nSearchError: descendent of [application | gedit]: \"Paste\" menuitem\n\n", ""]
calling as root: rm -f '/tmp/tmp.dBE66obICt'
call returned: [0, "", ""]
And I symmetrically encrypt the message with password "asdf" # features/step_definitions/encryption.rb:143
Command failed: /usr/bin/python '/tmp/tmp.dBE66obICt'
error code: 1
stderr: .
<false> is not true. (ExecutionFailedInVM)
./features/support/helpers/vm_helper.rb:441:in `rescue in execute_successfully'
./features/support/helpers/vm_helper.rb:438:in `execute_successfully'
./features/support/helpers/dogtail.rb:87:in `run'
./features/support/helpers/dogtail.rb:203:in `block (2 levels) in <class:Node>'
./features/step_definitions/encryption.rb:68:in `gedit_paste_into_a_new_tab'
./features/step_definitions/encryption.rb:149:in `/^I symmetrically encrypt the message with password "([^"]+)"$/'
features/encryption.feature:34:in `And I symmetrically encrypt the message with password "asdf"'
Then I can decrypt the encrypted message # features/step_definitions/encryption.rb:123
[...]
The click()
:s simply do not happen.
Attachments
Parent Task: #10288
Related issues
-
Blocked by #11091 (closed) -
Blocked by #11092 (closed)
Original created by @anonym on 11409 (Redmine)
Edited by intrigeri