def test_sidebar(kibana): home_page = KibanaPage(kibana.url, '/') home_page.open() assert not home_page.current_url().startswith("app/apm") home_page.apm_sidebar_button.click() assert home_page.current_url().startswith("app/apm"), "current url: " + home_page.current_url() close_driver()
def test_sidebar(kibana): home_page = KibanaPage(kibana.url, '/') home_page.open() assert not home_page.current_url().startswith("app/apm") home_page.apm_sidebar_button.click() assert home_page.current_url().startswith( "app/apm"), "current url: " + home_page.current_url() close_driver()
def step_impl(context, page_name): context.page_name = page_name page = PAGES_MAP[page_name] context.page = page() success = None while not success: try: context.page.open() success = True except TimeoutException: print('caught TimeoutException') close_driver() context.driver = get_updated_driver() iframe = getattr(context.page, 'iframe', None) if iframe: context.driver.switch_to.frame(iframe) default_wait_for_page = getattr(context.page, 'default_wait', None) if default_wait_for_page: default_wait_for_page()
def teardown_class(self): pass close_driver()
def teardown_package(): close_driver()
def finalize(self, result): if self.when == WHEN_CLOSE.AFTER_ALL: close_driver()
def tear_down(): close_driver() if config.browser.headless: xvfb_launcher.stop()
def afterTest(self, test): if self.when == WHEN_CLOSE.AFTER_TEST: close_driver()
def close_driver_if_needed(self): if config.one_session: self.leave_only_one_tab() else: close_driver()
def fin(): close_driver()