diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/tests.py | 19 | 
1 files changed, 19 insertions, 0 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index b7c0a674e..8aef93b32 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -3714,6 +3714,25 @@ class SeleniumTests(StaticLiveServerTestCase):              element,          ) +    def access_from_dropdown(self, slug): +        if slug == 'contextrecord': +            slug = 'record' +        if slug == 'basefind': +            slug = 'find' +        self.WebDriverWait(self.selenium, self.waiting_time).until( +            lambda driver: driver.find_element_by_xpath( +                '//a[@class="nav-link dropdown-toggle"][@id="dropdown-menu-main"]' +            ) +        ) +        dropdown = self.selenium.find_element_by_xpath( +            '//a[@class="nav-link dropdown-toggle"][@id="dropdown-menu-main"]' +        ) +        self.scroll(dropdown) +        dropdown.click() +        self.selenium.find_element_by_xpath( +            '//div[@class="dropdown-menu show"]/a[@href="/' + slug + '_search/"]' +        ).click() +      def assertNotInDOM(self, xpath):          self.selenium.implicitly_wait(self.waiting_time / 5)          try:  | 
