Skip to main content
Read the Notte skill and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
Useful for extracting structured data from a page without LLM processing. The code is evaluated as a JavaScript expression. For simple cases use a single expression. For multi-statement logic, use an IIFE (Immediately Invoked Function Expression): (() => { /* statements */ return result; })() You will not get any output from console.log(), so simply use the return value if your goal is to gather information Example:
session.evaluate_js(code) returns the evaluated string directly (objects and arrays as JSON, a JS null as the string "null") and raises on failure with the actual JavaScript error. The action form session.execute(type="evaluate_js", code=...) returns the ExecutionResult envelope instead

Fields

Literal['evaluate_js']
default:"evaluate_js"
str
default:"Special Browser Actions"
str
str
required
The JavaScript code to evaluate on the page. Use a single expression or an IIFE for multi-statement code.

Module

notte_core.actions.actions