bluetooth_steps.ClickBluetoothSwitch(serial=serial, state="ON",
                                     blocking=True)()

# add step to connect device
bluetooth_steps.BtRemoveAllPairedDevices(serial=serial, blocking=True)()
bluetooth_steps.CheckBtVisibility(serial=serial, blocking=True)()
bluetooth_steps.CheckBtVisibility(serial=serial2, blocking=True)()

# Set Up

bluetooth_steps.LogInfo("##### ACTUAL TEST #####")()

bt_utils.bt_pair_devices(serial=serial,
                         dev=serial2,
                         dut_name=DUT_NAME,
                         dev_name=DEV_MAC_ADDRESS,
                         version_dut=DUT_VERSION,
                         version_dev=DEV_VERSION,
                         scan_max_attempts=3)

# Run
ui_steps.press_home(serial=serial)()
ui_steps.press_car(serial=serial)()
ui_steps.press_dialer(serial=serial)()

ui_steps.click_button_common(
    view_to_find={"text": "Phone"},
    second_view_to_find={"className": "android.widget.ImageButton"},
    serial=serial)()
ui_steps.click_button_common(view_to_find={"text": "Dial a number"},
                             view_to_check={"text": "Dial a number"},
Beispiel #2
0
    bluetooth_steps.LogInfo("##### ACTUAL TEST #####")()

    counter = 0
    while (counter < int(iteration)):
        if action_initiator == "Pair":
            bluetooth_steps.ClickBluetoothSwitch(serial=serial,
                                                 state="ON",
                                                 version=DUT_VERSION)()
            bt_utils.bt_pair_devices(
                serial=serial,
                dev=serial_dev,
                dut_name=DUT_NAME,
                dev_name=PAIRING_DEV_NAME,
                action_dut=action_dut,
                action_dev=action_dev,
                perform_action_first_on_initiator=action_initiator_first,
                pair_request_initiator=initiator,
                scan_timeout=scan_timeout,
                scan_max_attempts=scan_max_attempts,
                time_to_wait_timeout_action=timeout_time,
                version_dut=DUT_VERSION,
                version_dev=DEV_VERSION)
            bluetooth_steps.BtRemoveAllPairedDevices(serial=serial,
                                                     version=DUT_VERSION,
                                                     critical=False)()
            bluetooth_steps.BtRemoveAllPairedDevices(serial=serial_dev,
                                                     version=DEV_VERSION,
                                                     critical=False)()
            bluetooth_steps.ClickBluetoothSwitch(serial=serial,
                                                 state="OFF",
                                                 version=DUT_VERSION)()
    bluetooth_steps.BtChangeDeviceName(serial=serial_dev,
                                       name=PAIRING_DEV_NAME,
                                       version=DEV_VERSION,
                                       blocking=True)()
    bluetooth_steps.BtRemoveAllPairedDevices(serial=serial_dev,
                                             version=DEV_VERSION,
                                             blocking=True)()
    bluetooth_steps.CheckBtVisibility(serial=serial_dev,
                                      version=DEV_VERSION,
                                      blocking=True)()

    # pair devices
    bt_utils.bt_pair_devices(serial=serial,
                             dev=serial_dev,
                             dut_name=DUT_NAME,
                             dev_name=PAIRING_DEV_NAME,
                             scan_max_attempts=5,
                             version_dut=DUT_VERSION,
                             version_dev=DEV_VERSION,
                             blocking=True)
    # check dut internet connection
    bluetooth_steps.CheckInternetConnection(serial=serial, blocking=True)()

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

    bluetooth_steps.LogInfo("##### ACTUAL TEST #####")()

    # activate bt tethering on DUT
    bluetooth_steps.BtSetTethering(serial=serial,
                                   state="ON",
                                   tethering_settings_opened=False,