Site icon LD Talent Blog

How I learned to do browser automation with a Clojure REPL

Hire the author: Abhinav S

Exploring beyond Selenium? You’ve come to the right place.

I was motivated to explore alternative solutions for browser automation because tools like Selenium and even Katalon studio are very hard to setup and I wanted to have a REPL driven experience of interacting with the browser during development, languages like Java don’t provide that.

The goal of this project was to simply get started with a Clojure REPL driven based approach to browser automation and though there aren’t many articles or blogs on the internet about the same, I could grasp the basic concepts using the `tests` in the main `Github` repository for `Etaoin`.

Key Ideas and Learning Tools

But first, let’s make sure we’ve set up everthing correctly.

For this I made a video, which goes into a bit more depth regarding setting up Clojure with IntelliJ Cursive for professional development

This walkthrough assumes that you’re using IntelliJ Cursive for clojure development, I think it’s one of the simplest ways to get started with clojure though there are other options like cider in spacemacs, chlorine in Atom and calva in VsCode.

Learning strategy

Since I had some prior experience with automation tools, I basically relied on reading the tests in the main etaoin repository on Github. I think that it’s quite easy to get started with once the project is all setup correctly.

NOTE: The browser window size matters during the execution of etaoin programs and so I realized that once the code is develop it’s better to deploy on the headless mode.

Browser automation is a great way to create custom workflows, for example

Reflections on the experience

I think one of the biggest differences between an average engineer and an expert is the ability to read and comprehend the source of the libraries that we are using rather than just relying on treating them as a black box.

Conclusion and Next steps

As we were just getting our feet wet with the setup, getting to know the capabilities of etaoin and clojure REPL driven browswer automation, we took on only a simple task. However there are major applications of browser automation in regression testing during software development life cycles and in future we’ll be exploring how etaoin could be used in a more professional environment.

Image Credits: Wikipedia.com

Hire the author: Abhinav S

Exit mobile version