TIL-4 Automated screenshots using your testing framework.

Rahul Barwal
2 min readOct 23, 2023

--

Recently we had a requirement where we needed to generate screenshots and this was part of a flow.

buy vs build

Like all other tools, we first went on a lookout for existing tools which support our requirements. We found quite handful that were close enough, but finally decided on building our own solution due to 2 main reasons:

  1. We wanted more(compared to these 3rd party services) control over when our screenshots were taken.
    These provided only timeout option — which was definitely helpful but not precise enough.
  2. In one go, we wanted to scrap the app and open links on the page as well to take multiple screenshots.

build it was

Once we had decided on that, we had one more choice to make: which framework to pick cypress(frontend) or selenium(backend)

We POC’ed both solutions, I personally liked cypress solution better as it was more relevant and had better control over network controls. But our backend containers relied heavily on java, so instead of adding one more service which would have meant more maintenance and also adding one more node would have contributed to latency.

Finally we landed up using selenium with java with our rough architecture looking something like:

Though I hate using selenium in 2023, it fit our needs perfectly. And thats what tech should be about — fitting business needs.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response