extract_function_name
- s (str): Input string, e.g.,
1.
click_id(14)
,scroll_up()
,\'visit_page(url)\'
, etc.
click_id
, scroll_up
, visit_page
)
AsyncBaseBrowser
init
- headless (bool): Whether to run the browser in headless mode.
- cache_dir (Union[str, None]): The directory to store cache files.
- channel (
Literal["chrome", "msedge", "chromium"]
): The browser channel to use. Must be one of “chrome”, “msedge”, or “chromium”. - cookie_json_path (Optional[str]): Path to a JSON file containing authentication cookies and browser storage state. If provided and the file exists, the browser will load this state to maintain authenticated sessions. This is primarily used when
user_data_dir
is not set. - user_data_dir (Optional[str]): The directory to store user data for persistent context. If None, a fresh browser instance is used without saving data. (default: :obj:
None
)
init
clean_cache
wait_for_load
- timeout (int): Timeout in seconds.
click_blank_area
visit_page
ask_question_about_video
- question (str): The question to ask.
get_screenshot
- save_image (bool): Whether to save the image to the cache directory.
None
.
capture_full_page_screenshots
- scroll_ratio (float): The ratio of viewport height to scroll each step (default: 0.8).
get_visual_viewport
get_interactive_elements
get_som_screenshot
- save_image (bool): Whether to save the image to the cache directory.
scroll_up
scroll_down
get_url
click_id
extract_url_content
download_file_id
fill_input_id
scroll_to_bottom
scroll_to_top
hover_id
find_text_on_page
- search_text (str): The text to search for.
back
close
show_interactive_elements
get_webpage_content
_ensure_browser_installed
AsyncBrowserToolkit
init
- headless (bool): Whether to run the browser in headless mode.
- cache_dir (Union[str, None]): The directory to store cache files.
- channel (
Literal["chrome", "msedge", "chromium"]
): The browser channel to use. Must be one of “chrome”, “msedge”, or “chromium”. - history_window (int): The window size for storing the history of actions.
- web_agent_model (Optional[BaseModelBackend]): The model backend for the web agent.
- planning_agent_model (Optional[BaseModelBackend]): The model backend for the planning agent.
- output_language (str): The language to use for output. (default: :obj:
"en
”) - cookie_json_path (Optional[str]): Path to a JSON file containing authentication cookies and browser storage state. If provided and the file exists, the browser will load this state to maintain authenticated sessions without requiring manual login. (default: :obj:
None
) - user_data_dir (Optional[str]): The directory to store user data for persistent context. (default: :obj:
"user_data_dir/"
)