Commit 2e59eb2b authored by JunHyung An's avatar JunHyung An
Browse files

Add \'admin alarm settings\' function

parent 544733d4
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -296,6 +296,23 @@ class MultipleTest(unittest.TestCase):
        driver.find_element_by_xpath(
            u"(.//*[normalize-space(text()) and normalize-space(.)='수집/판단 기준'])[1]/following::li[1]").click()

    def _admin_alarm_settings_actions(self, driver):
        """Performs admin-specific alarm setting actions."""
        time.sleep(0.5)
        driver.find_element_by_xpath("//div[@id='wrapper']/nav/span/a/div").click()
        driver.find_element_by_xpath(u"(.//*[normalize-space(text()) and normalize-space(.)='초기 설정'])[1]/following::span[1]").click()
        driver.find_element_by_xpath(u"(.//*[normalize-space(text()) and normalize-space(.)='각 자원별 이벤트 메시지와 공통 이벤트 등급을 설정하는 이벤트 부분과 E-Mail, 문자, 팝업 연계설정 및 알람 전송 결과를 확인 할 수 있습니다.'])[1]/following::span[1]").click()
        driver.find_element_by_xpath(u"(.//*[normalize-space(text()) and normalize-space(.)='장비 연관 관계'])[1]/following::li[1]").click()
        driver.find_element_by_id("tab-AlarmIndividualSetting").click()
        driver.find_element_by_xpath("//div[@id='pane-AlarmIndividualSetting']/div/div/div/div/div/div[2]/div[2]/div/div/div/div/div/div[2]/div/div/span[2]/span/span").click()
        driver.find_element_by_xpath("//div[@id='pane-AlarmIndividualSetting']/div/div/div/div[3]/div/div[2]/div[2]/label[2]/span").click()
        driver.find_element_by_xpath("//div[@id='pane-AlarmIndividualSetting']/div/div/div/div[3]/div/div[2]/div[3]/div[2]/div/div/div/div/div/div/span[2]/span/span").click()
        driver.find_element_by_xpath("//div[5]/div/div/div/div/div/div[3]/div/input").click()
        driver.find_element_by_xpath(u"(.//*[normalize-space(text()) and normalize-space(.)='장비'])[2]/following::li[1]").click()
        driver.find_element_by_xpath(u"(.//*[normalize-space(text()) and normalize-space(.)='자원구분'])[4]/following::div[2]").click()
        driver.find_element_by_xpath(u"(.//*[normalize-space(text()) and normalize-space(.)='동작 상태'])[33]/following::li[1]").click()
        driver.find_element_by_xpath("//div[2]/div/div/button/i").click()

    def _execute_single_action_and_measure(self, driver, user_id, action_func, driver_instance_number, action_name, *args, **kwargs):
        """Executes a single action and measures its duration."""
        start_time = time.time()
@@ -361,7 +378,8 @@ class MultipleTest(unittest.TestCase):
        self._execute_single_action_and_measure(driver, id, self._log_analysis_actions, instance_number, "_log_analysis_actions (2nd)")

        if account_type == 1:
            print(f"Session {instance_number}, User: {id}: Admin actions not defined for this driver function.")
            self._execute_single_action_and_measure(driver, id, self._admin_alarm_settings_actions, instance_number, "_admin_alarm_settings_actions")
            #self._execute_single_action_and_measure(driver, id, self._admin_alarm_settings_actions, instance_number, "_admin_alarm_settings_actions")
        elif account_type == 2:
            print(f"Session {instance_number}, User: {id}: Manager account - no specific admin actions.")
        elif account_type == 3: