fix(appium-tests): re-find the notifications button after the permission dialog

Returning from the system dialog recomposes the banner, so the saved
element reference is stale by the time it is clicked again.
This commit is contained in:
Davide Depau committed 2026-08-16 19:40:54 +02:00
1 parent 99965a7f3c
commit 2605ba04ce
1 file changed
+7 -1
+7 -1
View File
@@ -70,7 +70,13 @@ def test_accept_then_deny_notifications(driver: appium.webdriver.Remote, usb_wri
)
deny_btn.click()
sleep(0.5)
sure_btn.click()
# Re-find rather than reusing sure_btn: returning from the permission dialog
# recomposes the banner, which makes the old reference stale.
wait_for_element(
driver,
'//*[@resource-id="notifications_enable_button"]',
timeout=5,
).click()
enable_switch = wait_for_element(
driver,