# -*- coding:utf-8 -*-
# 作者：齐振鋆
# 日期：2023/2/17
# 描述:
from unit.public.UI.BasePage import BasePage


class Table(BasePage):
    def get_col_id(self, field_name):
        # 获取列id
        th_xpath = "//span[text()='{}']/ancestor::th[not(contains(@class, 'hidden'))]".format(field_name)
        return self.get_attribute(th_xpath, 'colid')
