Skip to main content
This method sends a close request to the API and verifies that the session was properly closed. It logs the session closure and raises an error if the session fails to close. Example:
from notte_sdk import NotteClient

client = NotteClient()
session = client.Session()
session.start()
session.stop()
Note that we strongly recommend using the with statement to start and stop the session to avoid any issues with session cleanup.
Example:
from notte_sdk import NotteClient

client = NotteClient()
with client.Session() as session:
    session.execute({"type": "goto", "url": "https://www.notte.cc"})

Returns

None

Raises

  • ValueError: If the session hasn’t been started (no session_id available).
  • RuntimeError: If the session fails to close properly.
I