Loading load_check.py +1 −8 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ class MultipleTest(unittest.TestCase): setattr(driver, 'screenshot_counter', counter) counter_str = str(counter).zfill(4) filename = os.path.join(session_folder, f"{counter_str}_{action_name}.png") time.sleep(3) # Set common wait time before save screenshot(except custom dashboard) driver.save_screenshot(filename) # print(f"Screenshot saved: {filename}") except (FileNotFoundError, PermissionError): Loading Loading @@ -200,7 +201,6 @@ class MultipleTest(unittest.TestCase): """Performs the login action.""" driver.get(address) self._take_screenshot(driver, "page_load") time.sleep(0.5) wait.until(EC.element_to_be_clickable((By.XPATH, "//input[@type='text']"))).click() driver.find_element(By.XPATH, "//input[@type='text']").clear() Loading @@ -210,7 +210,6 @@ class MultipleTest(unittest.TestCase): self._take_screenshot(driver, "credentials_entered") driver.find_element(By.XPATH, "//button[@type='button']").click() self._take_screenshot(driver, "login_button_click") time.sleep(0.5) def _dashboard_actions(self, driver): """Performs actions on the Dashboard.""" Loading @@ -219,14 +218,11 @@ class MultipleTest(unittest.TestCase): # Default dashbaord self._take_screenshot(driver, "dashboard_menu_click") driver.find_element(By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/div/article/div/div/div/div/div/div/div/div[2]/div/div/span[2]/span/span").click() time.sleep(1.5) self._take_screenshot(driver, "dashboard_default_first_module_click") driver.find_element(By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/div/article/div/div/div/div/div/div/div/div[2]/div[2]/div/span[2]/span/span").click() time.sleep(1.5) self._take_screenshot(driver, "dashboard_default_second_module_click") try: wait.until(EC.element_to_be_clickable((By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/div/article/div/div/div/div/div/div/div/div[2]/div[3]/div/span[2]/span/span"))).click() time.sleep(1.5) self._take_screenshot(driver, "dashboard_default_third_module_click") except (TimeoutException, NoSuchElementException): print("There is no third modules") Loading @@ -251,15 +247,12 @@ class MultipleTest(unittest.TestCase): driver.find_element(By.XPATH, "//div[@id='wrapper']/nav/ul/li[2]/a/div").click() self._take_screenshot(driver, "topology_map_menu_click") driver.find_element(By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/article/div/div/div/div/div/div/span[2]/span/span[2]").click() time.sleep(3) self._take_screenshot(driver, "topology_first_parent_element_click") try: wait.until(EC.element_to_be_clickable((By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/article/div/div/div/div/div/div[2]/div/div/span[2]/span/span[2]"))).click() time.sleep(3) self._take_screenshot(driver, "topology_child_element_click") except (TimeoutException, NoSuchElementException): driver.find_element(By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/article/div/div/div/div/div[2]/div/span[2]/span/span[2]").click() time.sleep(3) self._take_screenshot(driver, "topology_second_parent_element_click") def _performance_operation_actions(self, driver): Loading Loading
load_check.py +1 −8 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ class MultipleTest(unittest.TestCase): setattr(driver, 'screenshot_counter', counter) counter_str = str(counter).zfill(4) filename = os.path.join(session_folder, f"{counter_str}_{action_name}.png") time.sleep(3) # Set common wait time before save screenshot(except custom dashboard) driver.save_screenshot(filename) # print(f"Screenshot saved: {filename}") except (FileNotFoundError, PermissionError): Loading Loading @@ -200,7 +201,6 @@ class MultipleTest(unittest.TestCase): """Performs the login action.""" driver.get(address) self._take_screenshot(driver, "page_load") time.sleep(0.5) wait.until(EC.element_to_be_clickable((By.XPATH, "//input[@type='text']"))).click() driver.find_element(By.XPATH, "//input[@type='text']").clear() Loading @@ -210,7 +210,6 @@ class MultipleTest(unittest.TestCase): self._take_screenshot(driver, "credentials_entered") driver.find_element(By.XPATH, "//button[@type='button']").click() self._take_screenshot(driver, "login_button_click") time.sleep(0.5) def _dashboard_actions(self, driver): """Performs actions on the Dashboard.""" Loading @@ -219,14 +218,11 @@ class MultipleTest(unittest.TestCase): # Default dashbaord self._take_screenshot(driver, "dashboard_menu_click") driver.find_element(By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/div/article/div/div/div/div/div/div/div/div[2]/div/div/span[2]/span/span").click() time.sleep(1.5) self._take_screenshot(driver, "dashboard_default_first_module_click") driver.find_element(By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/div/article/div/div/div/div/div/div/div/div[2]/div[2]/div/span[2]/span/span").click() time.sleep(1.5) self._take_screenshot(driver, "dashboard_default_second_module_click") try: wait.until(EC.element_to_be_clickable((By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/div/article/div/div/div/div/div/div/div/div[2]/div[3]/div/span[2]/span/span"))).click() time.sleep(1.5) self._take_screenshot(driver, "dashboard_default_third_module_click") except (TimeoutException, NoSuchElementException): print("There is no third modules") Loading @@ -251,15 +247,12 @@ class MultipleTest(unittest.TestCase): driver.find_element(By.XPATH, "//div[@id='wrapper']/nav/ul/li[2]/a/div").click() self._take_screenshot(driver, "topology_map_menu_click") driver.find_element(By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/article/div/div/div/div/div/div/span[2]/span/span[2]").click() time.sleep(3) self._take_screenshot(driver, "topology_first_parent_element_click") try: wait.until(EC.element_to_be_clickable((By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/article/div/div/div/div/div/div[2]/div/div/span[2]/span/span[2]"))).click() time.sleep(3) self._take_screenshot(driver, "topology_child_element_click") except (TimeoutException, NoSuchElementException): driver.find_element(By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/article/div/div/div/div/div[2]/div/span[2]/span/span[2]").click() time.sleep(3) self._take_screenshot(driver, "topology_second_parent_element_click") def _performance_operation_actions(self, driver): Loading