Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jeffrey Schoemaker 408 posts 2138 karma points MVP 8x c-trib
    Jul 24, 2020 @ 06:08
    Jeffrey Schoemaker
    0

    Screenshot rendering

    Hi brilliant Umbraco community,

    Currently we're figuring out whether we can autogenerate screenshots of each A/B Test. These screenshots can later be used to generate some sort of report to the end client with screenshots of the variants and the results.

    Of course a great idea, but we're a bit stuck in how to do this.

    Requirements:

    • Browser incompatibility (and preferrable rendered by servercode and not by clientside code)
    • No usage of external webservices, because we want to have as less dependencies in our package as possible
    • No usage of an external server (some sort of screenshot rendering webserver) because of the same reason.
    • Must work on Umbraco Cloud

    We've looked into the Selenium NuGet-package (https://www.nuget.org/packages/Selenium.WebDriver.ChromeDriver/), but that requires Chrome on the server and that will not work on Umbraco Cloud for example.

    Anyone any good ideas / experience?

    Thank you already!

    Clueless Jeffrey

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Jul 24, 2020 @ 12:06
    Stefan Kip
    0

    How about Puppeteer Sharp? Might work for you?

  • Frans de Jong 548 posts 1840 karma points MVP 4x c-trib
    Jul 24, 2020 @ 17:38
    Frans de Jong
    0

    We use ABCpdf. It renders HTML by using some sort of chrome in a Dll solution. That works on cloud. If it can render a PDF so I think you should be able to render a image the same way?

  • Jeffrey Schoemaker 408 posts 2138 karma points MVP 8x c-trib
    Jul 25, 2020 @ 08:50
    Jeffrey Schoemaker
    0

    Thanks guys, we will check this out next week!

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Sep 04, 2020 @ 13:04
    Stefan Kip
    0

    I found out Puppeteer Sharp doesn't work on Azure WebApps and thus Umbraco Cloud. The work-around is to use an Azure Function.

    Have you looked into this and made any progress Jeffrey?

  • Jeffrey Schoemaker 408 posts 2138 karma points MVP 8x c-trib
    Sep 04, 2020 @ 13:32
    Jeffrey Schoemaker
    1

    Hi Stefan,

    thanks for your answer! We looked around but none of the found packages fulfilled our requirements unfortunately.

    For now we deprioritized on our backlog. I think we end up one time in the future with a seperate server instance generating these screenshots. Something like screenshots.umarketingsuite.com. The installed package sends a request to that server; the server spiders your url; generates a screenshot and sends it back to the website/package.

    Drawbacks of that approach are:

    • We have a dependency in the package on a server that we need to keep up and running. Now and also in ten years :S
    • It cannot be used on internal websites or websites behind a login (without creating some sort of unwanted security hack in the package)
    • How do we handle rendering different variants for this screenshot-server, but not give that opportunity to script kiddies, website visitors, etcetera...

    I think we will manage all these drawbacks, but for now we have but in on a lower priority in our backlog.

    Thanks for reporting back though! Have a great friday,

    Jeffrey Schoemaker

    enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft