From d047c98cb2eb5d3f49b63d9d7df703f93dad2094 Mon Sep 17 00:00:00 2001 From: matejcik Date: Thu, 17 Jun 2021 16:29:54 +0200 Subject: [PATCH] feat(python/debuglink): auto-page on pageable screens --- python/.changelog.d/1671.added | 1 + python/src/trezorlib/debuglink.py | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 python/.changelog.d/1671.added diff --git a/python/.changelog.d/1671.added b/python/.changelog.d/1671.added new file mode 100644 index 0000000000..724b4a8279 --- /dev/null +++ b/python/.changelog.d/1671.added @@ -0,0 +1 @@ +Debuglink can automatically scroll through paginated views. diff --git a/python/src/trezorlib/debuglink.py b/python/src/trezorlib/debuglink.py index d05dcac097..dd7f5ff18e 100644 --- a/python/src/trezorlib/debuglink.py +++ b/python/src/trezorlib/debuglink.py @@ -234,6 +234,12 @@ class DebugUI: if self.input_flow is None: if br.code == messages.ButtonRequestType.PinEntry: self.debuglink.input(self.get_pin()) + elif ( + br.pages is not None + and br.page_number is not None + and br.pages > br.page_number + ): + self.debuglink.swipe_up() else: self.debuglink.press_yes() elif self.input_flow is self.INPUT_FLOW_DONE: