get_content
Extract visible text, HTML, or linked URLs from the current page or a selected element, enabling content analysis and link discovery.
Instructions
Read visible text, HTML, or discovered URLs from the current page.
Use this tool when you need actual page content or URL information rather than page metadata.
Args: selector: Optional CSS selector or SeleniumBase text-matching selector identifying the element whose content should be read. For output_format="text" or "html", the selector scopes the returned content to that element. For output_format="urls", the selector scopes URL discovery to URLs within that element. When omitted, the operation applies to the whole page.
output_format:
- "text": Return visible text from the page or selected element.
- "html": Return HTML from the page or selected element.
- "urls": Return all discovered linked/resource URLs on the page
or within the selected element. URLs associated with elements
such as anchors, links, images, scripts, and metadata may be
included. SeleniumBase returns full URLs with their URL
prefixes.
include_shadow_dom: When output_format="html" and selector is omitted,
include any shadow-root HTML present in the page. This option has
no effect for "text" or "urls", or when a selector is specified.Returns: For output_format="text", a string containing visible text. For output_format="html", a string containing HTML. For output_format="urls", a list of URL strings. This is useful for crawling, link discovery, resource inspection, and finding candidate URLs before navigating to them.
Tool selection: - Need URL, title, origin, or User-Agent -> use get_page_info. - Need visible text -> use output_format="text". - Need page or element HTML -> use output_format="html". - Need URLs from the page or an element -> use output_format="urls". - Need structured information about matching elements -> use find_elements. - Need to check whether an element is present or visible -> use check_for_condition. - Need to wait for content to appear -> use wait_for.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | No | ||
| output_format | No | text | |
| include_shadow_dom | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |