Skip to content

problem in using the script option #43

Description

Hi,

I would like to click a button before capturing the screen which I add a script option as follows:

const Pageres = require('pageres');

const pageres = new Pageres({
    delay: 2,
    script: "document.querySelector('.coreSpriteRightChevron').click();"
})
	.src('https://www.instagram.com/p/BWh3WDKh5c5/', ['1600x1200'], {crop: true})
	.dest(__dirname)
	.run()
	.then(() => console.log('done'));

but it doesn't work. I tried to change the delay time, put it into different part of the script like in src or run but doesn't work too. Would you please help on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions