예제 #1
0
from testlib.scripts.android.adb import adb_steps
from testlib.scripts.android.ui import ui_steps
from testlib.scripts.media import media_steps

# Connect to device
from testlib.base.base_utils import get_args

globals().update(vars(get_args(sys.argv)))

OPENGL_VERSION = 'OpenGL ES 3.0'

########### Preconditions ###############
#########################################

adb_steps.connect_device(serial=serial, port=adb_server_port)()

############### Test ####################
#########################################

ui_steps.press_home()()
ui_steps.open_settings()()
ui_steps.open_app_from_settings(view_to_find={'text': 'About tablet'},
                                view_to_check={'textContains':
                                               OPENGL_VERSION})()

########### Postconditions ##############
#########################################

adb_steps.disconnect_device(serial=serial, local_port=adb_server_port)()
예제 #2
0
                      port=adb_server_port,
                      view_to_find={'text': PAIRING_DEV_NAME})()
bluetooth_steps_old.bt_accept_picture(serial=PAIRING_DEV,
                                      port=adb_server_port,
                                      path=BLUETOOTH_PATH)()

########### Postconditions ##############
#########################################

#clear photos
local_steps.command(command='rm ' + PHOTO_NAME)()
adb_steps.command(serial=serial, command='rm ' + PHOTO_PATH + PHOTO_NAME)()
adb_steps.command(serial=PAIRING_DEV,
                  command='rm ' + BLUETOOTH_PATH + PHOTO_NAME)()

#refresh media
adb_steps.command(serial=serial,
                  command=REFRESH_MEDIA_COMMAND + PHOTO_PATH + PHOTO_NAME)()
adb_steps.command(serial=PAIRING_DEV,
                  command=REFRESH_MEDIA_COMMAND + PHOTO_PATH + PHOTO_NAME)()

adb_steps.disconnect_device(
    serial=serial,
    local_port=adb_server_port,
)()

adb_steps.disconnect_device(
    serial=PAIRING_DEV,
    local_port=adb_server_port,
)()