def rotation():
    screen.record_screen(time_limit, name_file)
    device = dev.get_devices()
    dev.get_screen(device)
    obj.get_objects('Telefone')
    screen_rotation(device)
    screen.get_record(device, name_file)
def openApp(name_app):
    device = dev.get_devices()
    screen.record_screen(time_limit, name_file)
    events.swipe_screen()
    dev.get_screen(device)
    obj.get_objects(name_app)
    time.sleep(5)
    events.event_home()
    screen.get_record(device, name_file)
def test_search(text_search):
    screen.record_screen(time_limit, name_file)
    dev.get_screen(device)
    #events.swipe_screen()
    obj.get_objects('Chrome')
    search(text_search)
    events.event_back()
    events.event_home()
    screen.get_record(device, name_file)
예제 #4
0
def changeHour(hora, minuto):
    #pegar o dispositivo e gravar a tela
    device = dev.get_devices()
    screen.record_screen(time_limit, name_file)

    #pegar tela e abrir configurações
    events.swipe_screen()
    dev.get_screen(device)
    obj.get_objects('Configurar')

    #pegar tela e abrir sistema
    time.sleep(2)
    events.swipe_screen()
    dev.get_screen(device)
    obj.get_objects('Sistema')

    #pegar tela e abrir Data e Hora
    time.sleep(2)
    dev.get_screen(device)
    obj.get_objects('Data e hora')

    #pegar tela e desabilitar data e hora automaticas
    time.sleep(2)
    dev.get_screen(device)
    obj.get_objects('Data e hora automáticas')

    #pegar tela e definir hora
    time.sleep(2)
    dev.get_screen(device)
    obj.get_objects('Definir hora')

    #pegar tela e definir hora
    time.sleep(2)
    dev.get_screen(device)
    obj.get_objects1(hora)
    time.sleep(2)
    dev.get_screen(device)
    obj.get_objects1(minuto)
    time.sleep(2)
    obj.get_objects('OK')

    #pegar tela e desabilitar data e hora automaticas
    time.sleep(2)
    dev.get_screen(device)
    obj.get_objects('Data e hora automáticas')

    time.sleep(2)
    events.event_home()
    #screen.get_record(device)
    events.reboot()
예제 #5
0
def install_uninstall():
    device = dev.get_devices()
    screen.record_screen(time_limit, name_file)
    install_apps()
    time.sleep(2)
    dev.get_screen(device)
    obj.get_objects('Wikipédia')
    time.sleep(2)
    events.event_home()
    time.sleep(2)
    events.swipe_screen()
    time.sleep(2)
    dev.get_screen(device)
    obj.get_objects('AnkiDroid')
    uninstall_apps()
    screen.get_record(device)
def change_language():
    #pegar o dispositivo e gravar a tela
    device = dev.get_devices()
    screen.record_screen(time_limit, name_file)

    #pegar tela e abrir configurações
    events.swipe_screen()
    dev.get_screen(device)
    obj.get_objects('Configurar')

    #pegar tela e abrir sistema
    time.sleep(3)
    events.swipe_screen()
    dev.get_screen(device)
    obj.get_objects('Sistema')

    #pegar tela e abrir idiomas e entrada
    time.sleep(3)
    dev.get_screen(device)
    obj.get_objects('Idiomas e entrada')

    #pegar tela e abrir Idiomas
    time.sleep(3)
    dev.get_screen(device)
    obj.get_objects('Idiomas')

    time.sleep(3)
    #dev.get_screen(device)

    output = subprocess.Popen("adb shell input swipe 926 242 926 500 500",
                              shell=True,
                              stdout=subprocess.PIPE)
    time.sleep(3)
    output1 = subprocess.Popen("adb shell input swipe 926 242 926 500 500",
                               shell=True,
                               stdout=subprocess.PIPE)
    time.sleep(3)
    events.event_home()
def inverting_colors():
    screen.record_screen(time_limit, name_file)
    device = dev.get_devices()
    enable_disable_colors()
    events.event_back()
    screen.get_record(device, name_file)