Пример #1
0
 def get_task_starttime(self, task_type, vm_name, host_name):
     '''
     Now retrieve task info, the result is only task start time.
     '''
     self.pd_browser_main_map.switch_to_default_content()
     current_tasks_btn = self.pd_browser_main_map.get_current_task_btn()
     current_tasks_btn.click()
     #time.sleep(TestSpeedControl.TEST_STEP_INTERVAL)
     tasks_popup = self.pd_browser_main_map.get_popup_tasks()
     tasks_popup_cls_attr = tasks_popup.get_attribute("class")
     PD_DebugLog.debug_print("The current task: " + tasks_popup_cls_attr)
     if not "open-state" in tasks_popup_cls_attr:
         # click the button again
         current_tasks_btn.click()
         time.sleep(TestSpeedControl.TEST_STEP_INTERVAL)
         
     # Step 13: show the task name
     pd_browser_current_task_map = PD_CurrentTasks_UIMap(self.pd_client_browser)
     #task_name_txt = pd_browser_current_task_map.get_task_name()
     task_idx = pd_browser_current_task_map.get_task_id(vm_name)
     
     info = pd_browser_current_task_map.get_task_starttime(task_idx)
     return info
Пример #2
0
    def get_task_starttime(self, task_type, vm_name, host_name):
        '''
        Now retrieve task info, the result is only task start time.
        '''
        self.pd_browser_main_map.switch_to_default_content()
        current_tasks_btn = self.pd_browser_main_map.get_current_task_btn()
        current_tasks_btn.click()
        #time.sleep(TestSpeedControl.TEST_STEP_INTERVAL)
        tasks_popup = self.pd_browser_main_map.get_popup_tasks()
        tasks_popup_cls_attr = tasks_popup.get_attribute("class")
        PD_DebugLog.debug_print("The current task: " + tasks_popup_cls_attr)
        if not "open-state" in tasks_popup_cls_attr:
            # click the button again
            current_tasks_btn.click()
            time.sleep(TestSpeedControl.TEST_STEP_INTERVAL)

        # Step 13: show the task name
        pd_browser_current_task_map = PD_CurrentTasks_UIMap(
            self.pd_client_browser)
        #task_name_txt = pd_browser_current_task_map.get_task_name()
        task_idx = pd_browser_current_task_map.get_task_id(vm_name)

        info = pd_browser_current_task_map.get_task_starttime(task_idx)
        return info