flood-io / element

💦Load test your app using real web browsers
https://element.flood.io
Apache License 2.0
354 stars 43 forks source link

takeScreenshot png saved with jpeg extension #573

Open vhermecz opened 2 years ago

vhermecz commented 2 years ago

Describe the bug Screenshots are saved with jpeg extension even if takeScreenshot is called with {type:"png"}. NOTE: The file content IS png as expected.

To Reproduce Steps to reproduce the behavior:

export default () => {
    step('Load test report', async (browser: Browser) => {
        await browser.visit('https://google.com', {
            waitUntil: 'load',
        });
        await browser.wait(5);
        await browser.takeScreenshot({fullPage: true, type: "png"});
    });
};

Expected behavior Would expect screenshots to be created with extension png. Instead their extension is jpeg, the content is indeed png as one would expect.

Additional context