panther
panther copied to clipboard
Download Image
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?
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
getBoundingClientRectto get coordinates and size of the image - crop the screenshot to that coordinates