INNER CODE UNIT · Python

accept_usb_permission

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

def accept_usb_permission(driver: Remote, timeout: float = 1):
    ok_btn = wait_for_element(driver, '//*[@text="OK"]', timeout=timeout)
    ok_btn.click()


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,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…