diff --git a/tests/ui_tests/__init__.py b/tests/ui_tests/__init__.py index 2213a03dab..5d54257829 100644 --- a/tests/ui_tests/__init__.py +++ b/tests/ui_tests/__init__.py @@ -8,6 +8,7 @@ import pytest from _pytest.nodes import Node from _pytest.outcomes import Failed +from trezorlib.client import ProtocolVersion from trezorlib.debuglink import TrezorClientDebugLink as Client from . import common @@ -56,11 +57,14 @@ def screen_recording( yield finally: client.ensure_open() - client.sync_responses() + if client.protocol_version == ProtocolVersion.PROTOCOL_V1: + client.sync_responses() # Wait for response to Initialize, which gives the emulator time to catch up # and redraw the homescreen. Otherwise there's a race condition between that # and stopping recording. - client.init_device() + + # Instead of client.init_device() we create a new management session + client.get_seedless_session() client.debug.stop_recording() result = testcase.build_result(request)