capybara/__init__.py
def current_session():
    """
    Returns the :class:`Session` for the current driver and app, instantiating one if needed.

    Returns:
        Session: The :class:`Session` for the current driver and app.
    """

    driver = current_driver or default_driver

    session_key = "{driver}:{session}:{app}".format(
        driver=driver, session=session_name, app=str(id(app)))
    session = _session_pool.get(session_key, None)

    if session is None:
        from capybara.session import Session
        session = Session(driver, app)
        _session_pool[session_key] = session

    return session
def current_session():
    """
    Returns the :class:`Session` for the current driver and app, instantiating one if needed.

    Returns:
        Session: The :class:`Session` for the current driver and app.
    """

    driver = current_driver or default_driver

    session_key = "{driver}:{session}:{app}".format(
        driver=driver, session=session_name, app=str(id(app)))
    session = _session_pool.get(session_key, None)

    if session is None:
        from capybara.session import Session
        session = Session(driver, app)
        _session_pool[session_key] = session

    return session
def current_session ( ) : driver = current_driver or default_driver session_key = "{driver}:{session}:{app}" . format ( driver = driver , session = session_name , app = str ( id ( app ) ) ) session = _session_pool . get ( session_key , None ) if session is None : from capybara . session import Session session = Session ( driver , app ) _session_pool [ session_key ] = session return session
Returns the :class:`Session` for the current driver and app, instantiating one if needed.

    Returns:
        Session: The :class:`Session` for the current driver and app.
Returns the : class : Session for the current driver and app instantiating one if needed .