def check_monkeyglobal_scene(self, value):
        if self.lineEdit.text() == '':
            QMessageBox.information(None, '提示', '请填写带*号的必选项:压测命令',
                                    QMessageBox.Yes)
            return
        else:
            if self.lineEdit.text().split(' ')[0] != 'monkey':
                QMessageBox.information(None, '提示',
                                        '请填写正确的monkey压测命令:monkey开头的xxxxxx',
                                        QMessageBox.Yes)
                return

        if self.monkeyGlobal_dict["USB挂载正常,U盘个数:"]:
            if not self.lineEdit_4.text().isdigit():
                self.message('提示', 'U盘个数:请输入数字!')
                return
            else:
                self.usb_count = int(self.lineEdit_4.text())

        if value == "一键调试":
            if self.view_close(self.device_choice_ui):
                return
            self.device_choice_ui = device_chooose_connect(self)
            self.device_choice_ui.device_list_signal.connect(
                self.create_monkeyglobal_scene)
            self.device_choice_ui.show()
        else:
            if self.view_close(self.create_scene_view):
                return
            self.create_scene_view = create_scene_view('time', parent=self)
            self.create_scene_view.scene_information.connect(
                self.create_monkeyglobal_scene)
            self.create_scene_view.show()
    def check_scene_recovery(self, button_text):
        if self.save_app.checkedId() == -1:
            if self.message('提示', '请勾选是否保留应用') != QMessageBox.No:
                return
        if self.recover_dict["批量安装APK(APK路径:xxx)"]:
            if self.lineEdit_6.text() == '':
                if self.message('提示', '请输入APK所在路径') != QMessageBox.No:
                    return
            else:
                self.apk_root = self.lineEdit_6.text()

        if self.recover_dict["移动存储设备是否能够成功挂载,U盘个数:"]:
            if not self.lineEdit_5.text().isdigit():
                if self.message('提示', 'U盘个数:请输入数字!') != QMessageBox.No:
                    return
            else:
                self.usb_count = int(self.lineEdit_5.text())
        if button_text == "一键调试":
            if self.view_close(self.device_choice_ui):
                return
            self.device_choice_ui = device_chooose_connect(self)
            self.device_choice_ui.device_list_signal.connect(
                self.create_recovery_scene)
            self.device_choice_ui.show()
        else:
            if self.view_close(self.create_scene_view):
                return
            self.create_scene_view = create_scene_view('count', parent=self)
            self.create_scene_view.scene_information.connect(
                self.create_recovery_scene)
            self.create_scene_view.show()
 def set_scene_information(self, script_list):
     if len(script_list) == 0:
         self.setHidden(False)
     else:
         self.script_list = script_list
         self.get_scene_information = create_scene_view('count',
                                                        parent=self)
         self.get_scene_information.scene_information.connect(
             self.create_recorder_scene)
         self.get_scene_information.show()
         self.get_scene_information.move(
             self.geometry().left() * 0.9 + self.width() * 0.1,
             self.geometry().top() - self.height() * 0.1)
Example #4
0
 def dc_scene(self, value):
     if value == "一键调试":
         if self.view_close(self.device_choice_ui):
             return
         self.device_choice_ui = device_chooose_connect(self)
         self.device_choice_ui.device_list_signal.connect(self.create_dc_scene)
         self.device_choice_ui.show()
     else:
         if self.view_close(self.create_scene_view):
             return
         self.create_scene_view = create_scene_view('count',parent=self)
         self.create_scene_view.scene_information.connect(self.create_dc_scene)
         self.create_scene_view.show()
    def check_TV_scene(self, value):
        if not True in list(self.choice_dict.values())[0:5]:
            self.message('提示', '请勾选带*号的必选项:信源选择')
            return
        # if self.choice_dict["蓝牙音箱是否回连成功"]:
        #     if not self.lineEdit_5.text():
        #         self.message('提示', '请输入蓝牙Mac地址!')
        #         return
        #     else:
        #         self.a2dp_mac = self.lineEdit_5.text()
        if self.lineEdit.text() != "":
            try:
                if self.lineEdit.text().isdigit():
                    self.channel_switch_interval = float(self.lineEdit.text())*3600
                else:
                    self.channel_switch_interval = float(self.lineEdit.text())*3600
            except:
                self.lineEdit.clear()
                self.label_11.setHidden(False)
                return

        if self.lineEdit_2.text() != "":
            try:
                self.performance_interval = float(self.lineEdit_2.text())*60
            except:
                self.lineEdit_2.clear()
                self.label_13.setHidden(False)
                return

        if self.lineEdit_3.text() != "":
            try:
                self.check_interval = float(self.lineEdit_3.text())*60
            except:
                self.lineEdit_3.clear()
                self.label_12.setHidden(False)
                return

        self.performance_str = self.lineEdit_4.text() if self.lineEdit_4.text() else ''
        if value == "一键调试":
            if self.view_close(self.device_choice_ui):
                return
            self.device_choice_ui = device_chooose_connect(self)
            self.device_choice_ui.device_list_signal.connect(self.create_scene_TV)
            self.device_choice_ui.show()
        else:
            if self.view_close(self.create_scene_view):
                return
            self.create_scene_view = create_scene_view('time', parent=self)
            self.create_scene_view.scene_information.connect(self.create_scene_TV)
            self.create_scene_view.show()
    def check_onoff_scene(self, value):
        if self.mode == None:
            if self.message('提示', '请勾选带*号的必选项:开机模式') != QMessageBox.No:
                return

        if self.lineEdit_2.text() == "":
            if self.message('提示', '请填写带*号的必选项:待机等待时间') != QMessageBox.No:
                return
        if self.lineEdit_7.text() == "":
            if self.message('提示', '请填写带*号的必选项:开机等待时间') != QMessageBox.No:
                return
        else:
            if self.lineEdit_2.text().isdigit():
                self.waittime = int(self.lineEdit_2.text())
            else:
                self.lineEdit_2.clear()
                self.label_9.setHidden(False)
                return
            if self.lineEdit_7.text().isdigit():
                self.boottime = int(self.lineEdit_7.text())
            else:
                self.lineEdit_7.clear()
                self.label_25.setHidden(False)
                return
        self.ad_root = self.lineEdit.text() if self.lineEdit.text() else ''
        if self.onAndoff_dict["移动存储设备挂载是否成功,U盘个数:"]:
            if not self.lineEdit_3.text().isdigit():
                if self.message('提示', 'U盘个数:请输入数字!') != QMessageBox.No:
                    return
            else:
                self.usb_count = int(self.lineEdit_3.text())

        if value == "一键调试":
            if self.view_close(self.device_choice_ui):
                return
            self.device_choice_ui = device_chooose_connect(self)
            self.device_choice_ui.device_list_signal.connect(
                self.create_onoff_scene)
            self.device_choice_ui.show()
        else:
            if self.view_close(self.create_scene_view):
                return
            self.create_scene_view = create_scene_view('count', parent=self)
            self.create_scene_view.scene_information.connect(
                self.create_onoff_scene)
            self.create_scene_view.show()
 def to_screen_scene(self, value):
     if self.video_choice.checkedId() == -1:
         QMessageBox.information(None, '提示', '请勾选带*号的必选项:视频选择',
                                 QMessageBox.Yes)
         return
     if value == "一键调试":
         if self.view_close(self.device_choice_ui):
             return
         self.device_choice_ui = device_chooose_connect()
         self.device_choice_ui.device_list_signal.connect(
             self.create_toscreen_scene)
         self.device_choice_ui.show()
     else:
         if self.view_close(self.create_scene_view):
             return
         self.create_scene_view = create_scene_view()
         self.create_scene_view.scene_information.connect(
             self.create_toscreen_scene)
         self.create_scene_view.show()
    def check_monkeylogic_scene(self, value):
        if self.monkeymode.checkedId() == -1:
            QMessageBox.information(None, '提示', '请勾选逻辑测试的模式:固定/自定义:',
                                    QMessageBox.Yes)
            return
        else:
            if self.monkeymode.checkedId() == 1:
                if self.lineEdit_7.text() == '':
                    QMessageBox.information(None, '提示', '请输入需执行的包名,以分号;区分',
                                            QMessageBox.Yes)
                    return
                else:
                    self.packages = self.lineEdit_7.text()
        if self.lineEdit_5.text() != "":
            try:
                self.switch_interval = float(self.lineEdit_5.text()) * 3600
            except:
                self.lineEdit_5.clear()
                self.label_12.setHidden(False)
                return

        if self.monkeyLogic_dict["USB挂载正常,U盘个数:"]:
            if not self.lineEdit_9.text().isdigit():
                self.message('提示', 'U盘个数:请输入数字!')
                return
            else:
                self.usb_count = int(self.lineEdit_9.text())

        if value == "一键调试":
            if self.view_close(self.device_choice_ui):
                return
            self.device_choice_ui = device_chooose_connect(self)
            self.device_choice_ui.device_list_signal.connect(
                self.create_monkeylogic_scene)
            self.device_choice_ui.show()
        else:
            if self.view_close(self.create_scene_view):
                return
            self.create_scene_view = create_scene_view('time', parent=self)
            self.create_scene_view.scene_information.connect(
                self.create_monkeylogic_scene)
            self.create_scene_view.show()
    def check_scene_boot_enter(self, button_text):
        if self.onAndoff_dict["内置应用"] == False and self.onAndoff_dict[
                "第三方应用"] == False and self.onAndoff_dict["信源"] == False:
            if self.message('提示', '请勾选一个开机直达应用') != QMessageBox.No:
                return

        if button_text == "一键调试":
            if self.view_close(self.device_choice_ui):
                return
            self.device_choice_ui = device_chooose_connect(self)
            self.device_choice_ui.device_list_signal.connect(
                self.create_scene_boot_enter)
            self.device_choice_ui.show()
        else:
            if self.view_close(self.create_scene_view):
                return
            self.create_scene_view = create_scene_view('count', parent=self)
            self.create_scene_view.scene_information.connect(
                self.create_scene_boot_enter)
            self.create_scene_view.show()
Example #10
0
    def aidc_scene(self, value):
        if self.mode_choice.checkedId() == -1:
            self.message('提示', '请勾选带*号的必选项:低功耗')
            return
        if self.radioButton_5.isChecked():
            self.low_power_mode = True
        else:
            self.low_power_mode = False

        if value == "一键调试":
            if self.view_close(self.device_choice_ui):
                return
            self.device_choice_ui = device_chooose_connect(self)
            self.device_choice_ui.device_list_signal.connect(self.create_aidc_scene)
            self.device_choice_ui.show()
        else:
            if self.view_close(self.create_scene_view):
                return
            self.create_scene_view = create_scene_view('count', parent=self)
            self.create_scene_view.scene_information.connect(self.create_aidc_scene)
            self.create_scene_view.show()
    def online_video_scene(self, value):
        if not True in list(self.online_dict.values())[0:10]:
            self.message('提示', '请勾选带*号的必选项:视频商')
            return

        if self.lineEdit_8.text() == "":
            if self.online_dict["本地视频_大码率"] == True or self.online_dict[
                    "本地视频_混合编解码"] == True:
                self.message('提示', '请填入已勾选的本地视频地址')
                return
        else:
            locat_video_list = self.lineEdit_8.text().split(';')
            len_locat_video_list = len(locat_video_list)
            if len_locat_video_list > 3:
                self.message('提示', '检查发现地址个数异常请先排查!')
                return
            for dir in locat_video_list:
                len_locat_video_list = len_locat_video_list if dir != '' else len_locat_video_list - 1
            if len_locat_video_list == 1 and self.online_dict[
                    "本地视频_大码率"] == True and self.online_dict[
                        "本地视频_混合编解码"] == True:
                self.message('提示', '请填入正确的本地视频地址个数,根据已勾选本地视频!')
                return
            elif len_locat_video_list == 2 and self.online_dict[
                    "本地视频_大码率"] == True and self.online_dict[
                        "本地视频_混合编解码"] == True:
                self.local_video['本地视频_大码率'] = locat_video_list[0]
                self.local_video['本地视频_混合编解码'] = locat_video_list[1]
            else:
                if len_locat_video_list == 2:
                    self.message('提示', '请根据填入的地址数量,勾选本地视频项!')
                    return
                elif self.online_dict["本地视频_大码率"] == True:
                    self.local_video['本地视频_大码率'] = self.lineEdit_8.text()
                elif self.online_dict["本地视频_混合编解码"] == True:
                    self.local_video['本地视频_混合编解码'] = self.lineEdit_8.text()
                else:
                    self.message('提示', '检查发现已输入地址,请勾选对应的本地视频项')
                    return

        # if self.online_dict["蓝牙音箱是否回连成功"]:
        #     if not self.lineEdit_9.text():
        #         self.message('提示', '请输入蓝牙Mac地址!')
        #     else:
        #         self.a2dp_mac = self.lineEdit_9.text()
        if self.lineEdit_2.text() != "":
            try:
                self.performance_interval = float(self.lineEdit_2.text()) * 60
            except:
                self.lineEdit_2.clear()
                self.label_15.setHidden(False)
                return

        self.performance_str = self.lineEdit_3.text()
        if value == "一键调试":
            if self.view_close(self.device_choice_ui):
                return
            self.device_choice_ui = device_chooose_connect(self)
            self.device_choice_ui.device_list_signal.connect(
                self.create_online_scene)
            self.device_choice_ui.show()
        else:
            if self.view_close(self.create_scene_view):
                return
            self.create_scene_view = create_scene_view('time', parent=self)
            self.create_scene_view.scene_information.connect(
                self.create_online_scene)
            self.create_scene_view.show()