puppeteer-get-iframe

1.0.0 • Public • Published

logo

version env language

A simple library for obtaining iframe with puppeteer

install

  • NOTE: for use this project, you need last version on puppeteer.

install this project with npm:

~# npm install puppeteer-get-iframe --save

now, import this on your project

const puppeteer = require('puppeteer')
const iframe = require('puppeteer-get-iframe').iframeAttached;

how to use

for get iframe from your project, you need pass page param and a name or id of iframe you want to get.

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  var frame = await iframe(page, 'IFRAME_ID_OR_NAME');
  console.log(frame)

  await browser.close();
})();

Package Sidebar

Install

npm i puppeteer-get-iframe

Weekly Downloads

76

Version

1.0.0

License

ISC

Unpacked Size

277 kB

Total Files

6

Last publish

Collaborators

  • ratts13