diff --git a/utils/EIP_action.py b/utils/EIP_action.py index b31d502..a4779f2 100644 --- a/utils/EIP_action.py +++ b/utils/EIP_action.py @@ -14,6 +14,7 @@ class ActionType(IntEnum): 請假 = 1 補卡 = 2 訂便當 = 3 + 訂會議室 = 4 @classmethod def has_value(cls, value): @@ -25,7 +26,8 @@ class Action(): self.action_list = {ActionType.登入: self.__登入, ActionType.請假: self.__請假, ActionType.補卡: self.__補卡, - ActionType.訂便當: self.__訂便當 + ActionType.訂便當: self.__訂便當, + ActionType.訂會議室: self.__訂會議室 } self.driver = driver @@ -143,3 +145,16 @@ class Action(): print("沒有尚未訂購的團購訂單") self.driver.switch_to.default_content() + + def __訂會議室(self): + """訂會議室""" + + self.driver.switch_to.frame(self.driver.find_element(By.ID, "main")) + all_meeting_room_tag = self.driver.find_element(By.ID, "WPPublicResource_TreeTagt0") # 會議室 + ActionChains(self.driver).move_to_element(all_meeting_room_tag).move_to_element(all_meeting_room_tag).click(all_meeting_room_tag).perform() + + Zhubei_tag = self.driver.find_element(By.ID, "WPPublicResource_TreeTagt1") # 竹北 + ActionChains(self.driver).move_to_element(Zhubei_tag).move_to_element(Zhubei_tag).click(Zhubei_tag).perform() + + meeting_room_500_tag = self.driver.find_element(By.ID, "WPPublicResource_TreeTagt2") # 500會議室 + ActionChains(self.driver).move_to_element(meeting_room_500_tag).move_to_element(meeting_room_500_tag).click(meeting_room_500_tag).perform()