Autopilot tests that involve special keys fail

Bug #1671155 reported by Olivier Tilloy on 2017-03-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Santiago Baldassin
webbrowser-app (Ubuntu)

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/", line 70, in test_user_exit_ESC
  File "/build/webbrowser-app/staging/tests/autopilot/webbrowser_app/emulators/", line 192, in press_key
  File "/usr/lib/python3/dist-packages/autopilot/input/", line 181, in press_and_release, delay)
  File "/usr/lib/python3/dist-packages/autopilot/input/", line 138, in press
  File "/usr/lib/python3/dist-packages/autopilot/input/", line 56, in press
    ecode = self._get_ecode_for_key(key)
  File "/usr/lib/python3/dist-packages/autopilot/input/", line 66, in _get_ecode_for_key
    raise ValueError('Unknown key name: %s.' % key)
ValueError: Unknown key name: Escape.

Related branches

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.

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.

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
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.

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
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).

Olivier Tilloy (osomon) wrote :

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

Santiago Baldassin (sbaldassin) wrote :
Changed in autopilot:
status: New → Confirmed
status: Confirmed → Fix Committed
Omer Akram (om26er) on 2017-03-08
Changed in autopilot:
status: Fix Committed → In Progress

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) on 2017-04-27
Changed in autopilot:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers