needs emulator for "close on screen keyboard"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-ui-toolkit (Ubuntu) |
Confirmed
|
High
|
Unassigned |
Bug Description
I'm currently writing tests for messaging-app. To go back from composing a message, the user currently has to (1) swipe down to close the OSK (on-screen keyboard), (2) swipe up to get the toolbar, and (3) press back.
Turns out that it is rather hard to close the keyboard, as you cannot even get an object for it. Right now I came up with the following hack:
def close_osk(self):
'''Swipe down to close on-screen keyboard'''
# TODO: hack! this belongs into the Ubuntu UI toolkit emulator
x1, y1, x2, y2 = self.main_
mid_x = (x2 - x1) // 2
mid_y = (y2 - y1) * 7 // 10
Changed in ubuntu-ui-toolkit: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
importance: | Undecided → High |
status: | New → Confirmed |
no longer affects: | ubuntu-ui-toolkit |
Hi Martin,
The ubuntu-keyboard emulator provides this but you of course have to have the maliit-server started with testability as well as having ubuntu- keyboard- autopilot installed.
If you are able to satisfy this prerequisite than the code looks like this:
>>> from ubuntu_ keyboard. emulators. keyboard import Keyboard
>>> kb = Keyboard()
>>> kb.dismiss()
I'm not sure if it helps you much at this stage but it's a possibility.