Autopilot tests that involve special keys fail

Bug #1671155 reported by Olivier Tilloy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Autopilot
Fix Released
High
Santiago Baldassin
webbrowser-app (Ubuntu)
New
Undecided
Unassigned

Bug Description

I upgraded my laptop running xenial+overlay to yakkety then zesty yesterday, and since then all webbrowser-app autopilot tests that involve pressing special keys or key combinations (like 'Escape', 'F6' or 'Ctrl+plus') are consistently failing:

Traceback (most recent call last):
  File "/build/webbrowser-app/staging/tests/autopilot/webbrowser_app/tests/test_fullscreen.py", line 70, in test_user_exit_ESC
    self.main_window.press_key('Escape')
  File "/build/webbrowser-app/staging/tests/autopilot/webbrowser_app/emulators/browser.py", line 192, in press_key
    self.keyboard.press_and_release(key)
  File "/usr/lib/python3/dist-packages/autopilot/input/_uinput.py", line 181, in press_and_release
    self.press(keys, delay)
  File "/usr/lib/python3/dist-packages/autopilot/input/_uinput.py", line 138, in press
    self._device.press(key_button)
  File "/usr/lib/python3/dist-packages/autopilot/input/_uinput.py", line 56, in press
    ecode = self._get_ecode_for_key(key)
  File "/usr/lib/python3/dist-packages/autopilot/input/_uinput.py", line 66, in _get_ecode_for_key
    raise ValueError('Unknown key name: %s.' % key)
ValueError: Unknown key name: Escape.

Related branches

Revision history for this message
Olivier Tilloy (osomon) wrote :

And the same tests also fail in a virtualbox xenial+overlay guest. I’m pretty sure they used to pass in that same guest when the host was running xenial+overlay.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

This also occurs for me on xenial+overlay, but i have found changing the key from "Escape" to "Esc" fixes the problem.

Revision history for this message
Olivier Tilloy (osomon) wrote :

And changing references to function keys such as 'F11' to 'f11' fixes that case too.

References to Ctrl+<key> combinations are still failing.

Changed in autopilot:
assignee: nobody → Santiago Baldassin (sbaldassin)
importance: Undecided → High
Revision history for this message
Olivier Tilloy (osomon) wrote :

References to Ctrl+<key> function as expected when I switch my keyboard layout to qwerty before running the tests. I think this is bug #1108742, which had disappeared, but is back.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I’m observing that references to 'Ctrl+Page_Down' don’t work any longer, changing them to 'Ctrl+PageDown' fix the issue (had to remove the underscore from 'Page_Down', and same for 'Page_Up').

summary: - Autopilot tests that involve special keys fail on zesty
+ Autopilot tests that involve special keys fail
Revision history for this message
Olivier Tilloy (osomon) wrote :

And I haven’t yet found a working replacement for the 'Ctrl+plus' key combination ('Ctrl+minus' seems to be working fine).

Revision history for this message
Olivier Tilloy (osomon) wrote :

Replacing 'Ctrl+plus' with 'Ctrl+equal' does the trick, although it’s not semantically equivalent.

Revision history for this message
Santiago Baldassin (sbaldassin) wrote :
Changed in autopilot:
status: New → Confirmed
status: Confirmed → Fix Committed
Omer Akram (om26er)
Changed in autopilot:
status: Fix Committed → In Progress
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :

Fix committed into lp:autopilot at revision None, scheduled for release in autopilot, milestone 1.4

Changed in autopilot:
status: In Progress → Fix Committed
Richard Huddie (rhuddie)
Changed in autopilot:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.