🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@robinpath/browser

Package Overview
Dependencies
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@robinpath/browser

Headless browser automation with Puppeteer: launch, navigate, click, type, screenshot, PDF, scrape

latest
npmnpm
Version
0.3.0
Version published
Maintainers
4
Created
Source

@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

robinpath add @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.

License

MIT

Keywords

browser

FAQs

Package last updated on 06 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts