def get_host_row(self, row_num: int = 0) -> WebElement: """Get host information from row""" def _table_has_enough_rows(): assert_enough_rows(row_num, self.table.row_count) wait_until_step_succeeds(_table_has_enough_rows, timeout=5, period=0.1) rows = self.table.get_all_rows() assert_enough_rows(row_num, len(rows)) return rows[row_num]
def get_single_job_row_from_popup(self, row_num: int = 0) -> WebElement: """Get single job row from *opened* popup""" def _popup_table_has_enough_rows(): assert_enough_rows(row_num, self.popup_jobs_row_count) with allure.step('Check popup table has enough rows'): wait_until_step_succeeds(_popup_table_has_enough_rows, timeout=5, period=0.1) rows = self.get_job_rows_from_popup() assert_enough_rows(row_num, len(rows)) return rows[row_num]
def _table_has_enough_rows(): assert_enough_rows(row_num, self.table.row_count)
def _popup_table_has_enough_rows(): assert_enough_rows(row_num, self.popup_jobs_row_count)