From 875c885c32fc6486bbf8fe9d67481ccf971ede75 Mon Sep 17 00:00:00 2001 From: Davide Depau Date: Sat, 15 Aug 2026 23:58:22 +0200 Subject: [PATCH] fix(appium-tests): tolerate the lay-flat sheet auto-proceeding mid-click --- appium-tests/etchdroid/actions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/appium-tests/etchdroid/actions.py b/appium-tests/etchdroid/actions.py index b6ad35b..09b667a 100644 --- a/appium-tests/etchdroid/actions.py +++ b/appium-tests/etchdroid/actions.py @@ -1,5 +1,6 @@ from appium.webdriver import Remote from selenium.common import ( + StaleElementReferenceException, TimeoutException, ) @@ -63,10 +64,12 @@ def confirm_write_image(driver: Remote): def skip_lay_flat_sheet(driver: Remote): + # The sheet auto-proceeds once the (emulated) gravity sensor reads flat, so the button + # can disappear before or during the click; in both cases the flow has already moved on. try: lay_flat_skip_btn = wait_for_element(driver, '//android.widget.TextView[@resource-id="layFlatSkipButton"]') lay_flat_skip_btn.click() - except TimeoutException: + except (TimeoutException, StaleElementReferenceException): pass