Get page

View as Markdown

Read the current URL, title, and active state for one page. Use this when your application already knows the pageId and does not need to list every page.

Get a page

1const page = await bctrl.tools.call("browser.pages.get", {
2 pageId,
3}, { runtimeId: runtime.id });
4
5console.log(page.url, page.title, page.active);

The Runtime must be active. This Tool is synchronous.

Request parameters

ParameterTypeRequiredDescription
pageIdPageIdYesPage to inspect.

Response

FieldTypeAlways presentDescription
idPageIdYesPage identifier.
urlstringYesCurrent page URL.
titlestringYesCurrent page title.
activebooleanYesWhether the page is active for subsequent browser work.

Next