import time

from selenium.webdriver.common.by import By
from Base.BasePage import BasePage
from config import AI_review_empid, AI_Prequalification_empid


# AI编辑工作室首页
class AIER(BasePage):
    def __init__(self):
        super().__init__('web')
        # AI审校编辑
        self.AI_review = (By.CSS_SELECTOR, f"div[id='studio-empId-{AI_review_empid}'] div[class='studio-item-inner']")
        # AI预审编辑
        self.AI_Prequalification = (
        By.CSS_SELECTOR, f"div[id='studio-empId-{AI_Prequalification_empid}'] div[class='studio-item-inner']")

    # 点击AI预审
    def to_AI_Prequalification(self):
        time.sleep(5)
        self.find_ele(self.AI_Prequalification).click()

    # 点击AI审校
    def to_AI_review(self):
        time.sleep(5)
        self.find_ele(self.AI_review).click()
