API Reference¶
Main APIs¶
-
get_session(service, browser, bind=''):
Async context manager API to start/stop a browser session.
Parameters: - service (
arsenic.services.Service
) – The service which manages the browser instance. - browser (
arsenic.browsers.Browser
) – The browser to start. - bind (str) – Optional URL to bind the browser to.
Returns: An async context manager.
- service (
-
start_session(service, browser, bind=''):
Coroutine to start new session.
Parameters: - service (
arsenic.services.Service
) – The service which manages the browser instance. - browser (
arsenic.browsers.Browser
) – The browser to start. - bind (str) – Optional URL to bind the br
Returns: An object which can be passed to
stop_session()
to stop the session.- service (
-
stop_session(session):
Coroutine to stop a session.
Parameters: session (Object returned from start_session()
.) – The session to stop.Returns: Nothing.