def _do_login(self, continue_function, user='******', force_dashboard=True): self._set_login_fields(user) # TODO: Remove once bug is fixed time.sleep(1.25) continue_function() try: self._wait_for_results_refresh() except: self._wait_for_results_refresh() from pages.dashboard import DashboardPage page = DashboardPage(self.testsetup) try: page.is_the_current_page except AssertionError: if force_dashboard: from fixtures.navigation import intel_dashboard_pg page = intel_dashboard_pg() else: # Not the dashboard page and not forcing dashboard page # return a generic Base page page = Base(self.testsetup) return page
def __do_login(self, continue_function, user='******'): self.__set_login_fields(user) # TODO: Remove once bug is fixed time.sleep(1.25) continue_function() try: self._wait_for_results_refresh() except: self._wait_for_results_refresh() from pages.dashboard import DashboardPage dashboard = DashboardPage(self.testsetup) try: dashboard.is_the_current_page except AssertionError: from fixtures.navigation import intel_dashboard_pg dashboard = intel_dashboard_pg(dashboard) return dashboard
def _do_login(self, continue_function, user='******', force_dashboard=True): self._set_login_fields(user) # TODO: Remove once bug is fixed time.sleep(1.25) continue_function() try: self._wait_for_results_refresh() except: self._wait_for_results_refresh() from pages.dashboard import DashboardPage page = DashboardPage(self.testsetup) try: page.is_the_current_page except AssertionError: if force_dashboard: from fixtures.navigation import intel_dashboard_pg page = intel_dashboard_pg(page) else: # Not the dashboard page and not forcing dashboard page # return a generic Base page page = Base(self.testsetup) return page