Skip to main content
STOP. Do not read past this section until you have read and followed /quickstart.md.Goal: produce a reliable SDK automation script. The intended authoring flow is generate then edit, not write browser automation from scratch.Do not hand-write SDK code with element IDs, selectors, or form fields from memory. Element IDs, selectors, and field mappings must come from a live observe() call, CLI notte page observe output, or generated workflow code. Guessed browser targets fail on real pages.Use the Notte skill and CLI to inspect the live site, validate actions/selectors, handle auth/session state, and export workflow code with notte sessions workflow-code before using SDK docs or SDK code.SDK reference pages are for understanding, running, or editing generated workflow code. They are not the starting point for manually authoring the initial browser automation. SDK-first code is guesswork on real-world pages with dynamic selectors, auth state, CAPTCHAs, and anti-bot behavior.
Sessions provide a comprehensive set of browser actions for interacting with web pages. All actions are executed through session.execute().

Goto

Navigate to a URL.
goto.py
Parameters:
  • url (str): The URL to navigate to
Use for: Opening pages, navigating between pages

GotoNewTab

Open a URL in a new browser tab.
goto_new_tab.py
Parameters:
  • url (str): The URL to open in a new tab
Use for: Opening multiple pages simultaneously, preserving context

SwitchTab

Switch to a different browser tab.
switch_tab.py
Parameters:
  • tab_index (int): Zero-based index of the tab to switch to
Use for: Managing multiple tabs, comparing content across pages

GoBack

Navigate back to the previous page.
go_back.py
Use for: Browser back button functionality, returning to previous pages

GoForward

Navigate forward in browser history.
go_forward.py
Use for: Browser forward button functionality

Reload

Reload the current page.
reload.py
Use for: Refreshing page content, retrying after errors

Interaction Actions

Click

Click on an element.
click.py
Parameters:
  • selector (str): CSS selector for the element
  • id (str): Element ID
  • text (str): Exact text content
  • aria_label (str): ARIA label attribute
  • placeholder (str): Placeholder text
  • title (str): Title attribute
Use for: Clicking buttons, links, checkboxes, any clickable element

Fill

Fill a text input or textarea.
fill.py
Parameters:
  • selector (str): CSS selector for the input
  • id (str): Element ID
  • placeholder (str): Placeholder text
  • aria_label (str): ARIA label
  • value (str): The text to fill
Use for: Filling forms, search boxes, text inputs

Check

Check or uncheck a checkbox.
check.py
Parameters:
  • selector (str): CSS selector for the checkbox
  • id (str): Element ID
  • checked (bool): True to check, False to uncheck
Use for: Toggling checkboxes, accepting terms, selecting options

SelectDropdownOption

Select an option from a dropdown.
select_dropdown_option.py
Parameters:
  • selector (str): CSS selector for the select element
  • option_text (str): Visible text of the option
  • option_value (str): Value attribute of the option
Use for: Selecting from dropdowns, choosing options

PressKey

Press a keyboard key.
press_key.py
Parameters:
  • key (str): Key name (e.g., “Enter”, “Escape”, “Tab”, “ArrowDown”)
Use for: Keyboard navigation, submitting forms, triggering shortcuts Common keys: Enter, Escape, Tab, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Backspace, Delete

EvaluateJs

Evaluate JavaScript code on the current page and return the result.
goto_new_tab.py
Parameters:
  • code (str): The JavaScript code to evaluate on the page
Use for: Evaluating JavaScript code, extracting data from the page

Scrolling Actions

ScrollUp

Scroll up on the page.
scroll_up.py
Use for: Scrolling to top of page, revealing content above

ScrollDown

Scroll down on the page.
scroll_down.py
Use for: Loading lazy content, revealing content below, pagination

File Actions

UploadFile

Upload a file to a file input.
upload_file.py
Parameters:
  • selector (str): CSS selector for the file input
  • id (str): Element ID
  • file_path (str): Path to the file to upload
Use for: Uploading documents, images, any file input

DownloadFile

Download a file from a link.
download_file.py
Parameters:
  • selector (str): CSS selector for the download link
  • id (str): Element ID
Use for: Downloading files, reports, documents

Wait Action

Wait

Pause execution for a specified duration.
wait.py
Parameters:
  • duration (int): Time to wait in milliseconds
Use for: Waiting for page loads, animations, dynamic content
Tip: Use sparingly. Notte automatically waits for page loads and element visibility. Only use Wait for specific timing requirements.

Data Extraction

Scrape

Extract data from the current page.
scrape.py
Parameters:
  • instructions (str): Natural language extraction instructions
  • response_format (type[BaseModel]): Pydantic model for structured output
  • only_main_content (bool): Extract only main content, ignore headers/footers
Use for: Data extraction, web scraping, content analysis See Scraping for detailed documentation.

Communication Actions

SmsRead

Read SMS messages from a persona’s phone number.
sms_read.py
Parameters:
  • persona_id (str): Persona ID with phone number
Use for: Reading 2FA codes, SMS verification, phone-based authentication See Personas for details.

EmailRead

Read emails from a persona’s email address.
email_read.py
Parameters:
  • persona_id (str): Persona ID with email address
Use for: Reading verification emails, email-based authentication See Personas for details.

Action Patterns

Chaining Actions

Execute multiple actions in sequence:
action_chaining.py

Error Handling

Handle action failures:
error_handling.py

Conditional Actions

Execute actions based on conditions:
conditional_actions.py

Selector Strategies

CSS Selectors

Most flexible and commonly used:
css_selectors.py

Direct Attributes

Use direct attribute parameters when available:
direct_attributes.py

Best Practices

Prefer stable selectors:
stable_selectors.py
Use specific selectors:
specific_selectors.py

Common Workflows

Form Submission

form_submission.py

Search and Extract

search_extract.py

Multi-Tab Workflow

multi_tab.py

File Upload and Download

file_upload_download.py

Next Steps

Session Configuration

Configure session behavior

Session Lifecycle

Manage session states

SDK Actions Reference

Detailed API documentation

Agent Mode

Let AI handle actions automatically