From faaacc18a53f3f7a4162137f3f8f1443e7998cb1 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sat, 6 Jul 2024 15:24:17 +0200 Subject: [PATCH] tests/emulator/bootstrap-*: work around ADD TO DICTIONARY --- tests/emulator/bootstrap_channels.py | 10 ++++++++++ tests/emulator/bootstrap_flakes.py | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/tests/emulator/bootstrap_channels.py b/tests/emulator/bootstrap_channels.py index d108fd2..08d1237 100644 --- a/tests/emulator/bootstrap_channels.py +++ b/tests/emulator/bootstrap_channels.py @@ -9,8 +9,16 @@ def run(d): nod.launch() wait_for(d, 'Bootstrap zipball location') + time.sleep(.5) screenshot(d, 'initial') d.ui(className='android.widget.EditText').set_text(BOOTSTRAP_URL) + time.sleep(.5) + if 'android:id/addToDictionaryButton' in d.ui.dump_hierarchy(): + screenshot(d, 'add-to-dictionary-interferes') + d.ui.press('back') + time.sleep(.5) + screenshot(d, 'add-to-dictionary-back-pressed') + time.sleep(.5) screenshot(d, 'entered-url') for i in range(2): if 'text="OK"' not in d.ui.dump_hierarchy(): @@ -18,7 +26,9 @@ def run(d): time.sleep(.5) else: break + time.sleep(.5) screenshot(d, 'entered-url-back') + time.sleep(.5) d.ui(text='OK').click() screenshot(d, 'ok-clicked') diff --git a/tests/emulator/bootstrap_flakes.py b/tests/emulator/bootstrap_flakes.py index 348e590..4d27a60 100644 --- a/tests/emulator/bootstrap_flakes.py +++ b/tests/emulator/bootstrap_flakes.py @@ -9,8 +9,16 @@ def run(d): nod.launch() wait_for(d, 'Bootstrap zipball location') + time.sleep(.5) screenshot(d, 'initial') d.ui(className='android.widget.EditText').set_text(BOOTSTRAP_URL) + time.sleep(.5) + if 'android:id/addToDictionaryButton' in d.ui.dump_hierarchy(): + screenshot(d, 'add-to-dictionary-interferes') + d.ui.press('back') + time.sleep(.5) + screenshot(d, 'add-to-dictionary-back-pressed') + time.sleep(.5) screenshot(d, 'entered-url') for i in range(2): if 'text="OK"' not in d.ui.dump_hierarchy(): @@ -18,7 +26,9 @@ def run(d): time.sleep(.5) else: break + time.sleep(.5) screenshot(d, 'entered-url-back') + time.sleep(.5) d.ui(text='OK').click() screenshot(d, 'ok-clicked')