'Waits until the task history table is visible.'

def wait_for_task_completion(self, expected_task_string):

    def check_func():
        '\n                                                Promise    Check    Function\n                                                '
        self.task_history_button.click()
        table = self.wait_for_task_history_table()
        return ((len(table) > 0) and (expected_task_string in table.results[0].text))
    return EmptyPromise(check_func, 'Waiting    for    student    admin    task    to    complete.').fulfill()
