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()
Exemple #2
0
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()
Exemple #5
0
def teardown_package():
    close_driver()
Exemple #6
0
def teardown_package():
    close_driver()
Exemple #7
0
 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()
Exemple #9
0
 def afterTest(self, test):
     if self.when == WHEN_CLOSE.AFTER_TEST:
         close_driver()
Exemple #10
0
 def close_driver_if_needed(self):
     if config.one_session:
         self.leave_only_one_tab()
     else:
         close_driver()
Exemple #11
0
 def finalize(self, result):
     if self.when == WHEN_CLOSE.AFTER_ALL:
         close_driver()
Exemple #12
0
 def afterTest(self, test):
     if self.when == WHEN_CLOSE.AFTER_TEST:
         close_driver()
Exemple #13
0
 def fin():
     close_driver()