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()
Exemplo n.º 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()
Exemplo n.º 5
0
def teardown_package():
    close_driver()
Exemplo n.º 6
0
def teardown_package():
    close_driver()
Exemplo n.º 7
0
 def finalize(self, result):
     if self.when == WHEN_CLOSE.AFTER_ALL:
         close_driver()
Exemplo n.º 8
0
 def tear_down():
     close_driver()
     if config.browser.headless:
         xvfb_launcher.stop()
Exemplo n.º 9
0
 def afterTest(self, test):
     if self.when == WHEN_CLOSE.AFTER_TEST:
         close_driver()
Exemplo n.º 10
0
 def close_driver_if_needed(self):
     if config.one_session:
         self.leave_only_one_tab()
     else:
         close_driver()
Exemplo n.º 11
0
 def finalize(self, result):
     if self.when == WHEN_CLOSE.AFTER_ALL:
         close_driver()
Exemplo n.º 12
0
 def afterTest(self, test):
     if self.when == WHEN_CLOSE.AFTER_TEST:
         close_driver()
Exemplo n.º 13
0
 def fin():
     close_driver()