Modules@robinpath/browser

@robinpath/browser

0.1.1Public

Headless browser automation with Puppeteer: launch browsers, navigate pages, interact with elements, take screenshots, generate PDFs, and scrape data

@robinpath/browser

Headless browser automation with Puppeteer: launch browsers, navigate pages, interact with elements, take screenshots, generate PDFs, and scrape data

Category Functions Auth License

Why use this module?

The browser module lets you:

  • Launch a headless browser instance
  • Open a new page in a browser instance
  • Navigate a page to a URL
  • Click an element on the page
  • Type text into an input element

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/browser

Quick Start

No credentials needed — start using it right away:

browser.newPage "main" "page1"

Available Functions

FunctionDescription
browser.launchLaunch a headless browser instance
browser.newPageOpen a new page in a browser instance
browser.gotoNavigate a page to a URL
browser.clickClick an element on the page
browser.typeType text into an input element
browser.selectSelect a dropdown option by value
browser.screenshotTake a screenshot of the page
browser.pdfGenerate a PDF from the page
browser.evaluateExecute JavaScript in the page context
browser.contentGet the full HTML content of the page
browser.titleGet the page title
browser.urlGet the current URL of the page
browser.waitForWait for a selector to appear on the page
browser.querySelectorGet text content or attribute of an element
browser.querySelectorAllGet text content of all matching elements
browser.cookiesGet all cookies for the current page
browser.setCookieSet a cookie on the page
browser.closeClose a page
browser.closeBrowserClose a browser instance and all its pages
browser.scrapeHigh-level scrape: navigate to URL and extract data by CSS selectors

Examples

Open a new page in a browser instance

browser.newPage "main" "page1"

Navigate a page to a URL

browser.goto "page1" "https://example.com" {"waitUntil": "networkidle2"}

Click an element on the page

browser.click "page1" "#submit-btn"

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/browser";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  browser.newPage "main" "page1"
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.1latestyesterday
Install
$ robinpath install @robinpath/browser
Version0.1.1
LicenseMIT
Unpacked Size6.1 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

web