def test_can_open_page_in_new_tab(browser, app_url):
    """should be able to visit url in a new tab"""
    browser.visit(app_url)
    browser.windows.current.new_tab(app_url)
    browser.windows[1].is_current = True
    assert app_url == browser.url
    assert 2 == len(browser.windows)

    browser.windows[0].is_current = True
    browser.windows[1].close()
should be able to visit url in a new tab
tests/tests_webdriver/test_webdriver.py