def select_dialog_click(entry): list_id = interface.get_view_by_class("AlertController$RecycleListView") if list_id is None: raise WidgetNotFound("no selection dialog visible") child_id = interface.get_view_child(list_id, entry) if child_id is None: raise WidgetNotFound("no entry %d in selection dialog" % entry) interface.click(child_id)
def click(name): widget_id = get_widget_id(name) return interface.click(widget_id)
def click_icon(entry_num): keyboard.press_menu() menu_id = widget.get_widget_id("android:icon_menu") entry_id = interface.get_view_child(menu_id, entry_num) interface.click(entry_id)
def click_by_text(text): keyboard.press_menu() menu_id = widget.get_widget_id("android:expanded_menu") entry_id = interface.get_view_child_by_text(menu_id, text) interface.click(entry_id)