INNER CODE UNIT · Python

confirm_write_image

etchdroid/etchdroid · appium-tests/etchdroid/actions.py:99

def confirm_write_image(driver: Remote):
    # Like the other taps on this screen, this one can be swallowed while the UI settles.
    # Confirm it took by waiting for what must follow: the lay-flat sheet, or the progress
    # screen when the sheet auto-proceeds (a device with a working gravity sensor).
    for _ in range(3):
        write_image_btn = wait_for_element(driver, '//*[@resource-id="writeImageButton"]')
        try:
            write_image_btn.click()
            wait_for_element(
                driver,
                '//android.widget.TextView[@resource-id="layFlatSkipButton"] | '
                '//android.widget.TextView[@resource-id="write_progress_title"]',
                timeout=5,
            )
            return
        except (TimeoutException, StaleElementReferenceException):
            continue

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…