import sys
import os

# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建预定系统的绝对路径
预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..','..','..'))
# 添加路径
sys.path.append(预定系统_path)
# 导入模块
from 预定系统.Base.base import *

class Meeting_TableCard_0001:
    tags = ['展厅巡检','桌牌测试']

    def teststeps(self):
        wd = GSTORE['wd']
        # 打开系统管理模块，点击桌牌
        safe_click((By.XPATH, "//span[contains(text(),'系统管理')]"),wd)
        sleep(2)
        safe_click((By.XPATH, "//li[contains(text(),'桌牌管理')]"),wd)
        sleep(2)
        # 切换至桌牌系统窗口界面
        wd.switch_to.window(wd.window_handles[1])
        sleep(4)
        INFO("进入桌牌系统")
        SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Meeting_TableCard", "进入桌牌系统")

        # 点击桌牌管理进入桌牌投图
        safe_click((By.XPATH, "//span[contains(text(),'桌牌管理')]"),wd)
        sleep(1)
        safe_click((By.XPATH, "//span[contains(text(),'桌牌投图')]"),wd)
        sleep(4)
        INFO("进入桌牌投图")
        SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Meeting_TableCard", "进入桌牌投图")