puppeteer-get-iframe
v1.0.0
Published
simple library for obtaining iframe with puppeteer
Downloads
160
Maintainers
Readme

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 --savenow, 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();
})();
