Fix bug with tabs navigation

This patch limit tab switch link search to main content only

Change-Id: Ia2a0f38b823f1b38823d3899c4c3ab56a89a7cf4
Closes-Bug: 1549635
This commit is contained in:
Georgy Dyuldin 2016-02-25 10:19:07 +03:00
parent dea5b2878e
commit 257546e2a4
1 changed files with 6 additions and 2 deletions

View File

@ -14,9 +14,11 @@ import importlib
import json
import types
from openstack_dashboard.test.integration_tests import config
from selenium.webdriver.common import by
import six
from openstack_dashboard.test.integration_tests import config
class Navigation(object):
"""Provide basic navigation among pages.
@ -181,6 +183,7 @@ class Navigation(object):
)
}
}
_main_content_locator = (by.By.ID, 'content_body')
# protected methods
def _go_to_page(self, path, page_class=None):
@ -215,7 +218,8 @@ class Navigation(object):
return self._get_page_class(path, page_class)(self.driver, self.conf)
def _go_to_tab_menu_page(self, item_text):
self.driver.find_element_by_link_text(item_text).click()
content_body = self.driver.find_element(*self._main_content_locator)
content_body.find_element_by_link_text(item_text).click()
def _go_to_settings_page(self, item_text):
"""Go to page that is located under the settings tab."""