Commit 0b04df98 authored by JunHyung An's avatar JunHyung An
Browse files

Check child topology existed

parent e066c5a9
Loading
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -245,15 +245,21 @@ class MultipleTest(unittest.TestCase):

    def _topology_map_actions(self, driver):
        """Performs actions on the Topology Map."""
        wait = WebDriverWait(driver, 3)
        time.sleep(0.5)
        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[2]/div/div/span[2]/span/span[2]").click()
        self._take_screenshot(driver, "topology_first_element_click")
        driver.find_element(By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/article/div/div/div/div/div/div[2]/div/div[2]/div/div/span[2]/span/span[2]").click()
        self._take_screenshot(driver, "topology_second_element_click")
        driver.find_element(By.XPATH, "//div[@id='wrapper']/div/div/aside/div/div/div/article/div/div/div/div/div/div[2]/div/div[2]/div/div[2]/div/div/span[2]/span/span[2]").click()
        self._take_screenshot(driver, "topology_third_element_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(1.5)
        self._take_screenshot(driver, "topology_first_parent_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(1.5)
            self._take_screenshot(driver, "topology_first_child_click")
        except (TimeoutException, NoSuchElementException):
            wait.until(EC.element_to_be_clickable((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(1.5)
            self._take_screenshot(driver, "topology_other_parent_click")

    def _performance_operation_actions(self, driver):
        """Performs actions on Performance/Operation."""