Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Image #583

Open
thedevale opened this issue Jan 13, 2023 · 1 comment
Open

Download Image #583

thedevale opened this issue Jan 13, 2023 · 1 comment

Comments

@thedevale
Copy link

Hi,
how can I download an image using Panther, after the image has been loaded?

This image, specifically, is a Captcha, and if I reload it from the source a new image is generated, so it's mandatory for me to download the exact image that has been loaded on page load

Is this possible?

@alexander-schranz
Copy link

I think you can do that by following steps:

  • get the image into your screen
  • take a screenshot with $client->takeScreenshot('screen.png');
  • use a JS script with getBoundingClientRect to get coordinates and size of the image
  • crop the screenshot to that coordinates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants