A company internal global Hackathon attempt & outcome

Step by Step guide on how I approached the 24 hour challenge and won $300 voucher

Complete bot/automation script code can be found <<HERE>>

Complete challenge application code can be found <<HERE>>

Automation script navigating through the website -



Problem statement -

Build a test automation script/ bot which can traverse a treasure hunt website and complete challenge at every step to enable next page. This activity was to be completed within 24 hours from the start time, Code was to be submitted to a public GitHub repository and shared for assessment to the organisers.

Evaluation Criteria for winning -

  • Completeness
  • Creativity
  • Speed
  • Tool Selection

Thought process on addressing the problem -

After assessment of the website that was to be automated, I decided to pick below tool set to address this scenario of treasure hunt

  • NodeJS - playwright, @playwright/test
    • Playwright enables reliable end-to-end testing for modern web apps.
13 November, 14:00 UK Hrs

Started the attempt after 2 hours from actual start time which was 12.30, As I was completing my daily chores by this time,

Initially completed the challenge manually to see the overall obstacles and where I could get stuck while automating

Following were the obstacles / levels to be cleared

1. Multiple button with same name called "PROCEED", everytime the page is loaded dynamically the button is shuffled that will take us to the next level

2. A youtube video embedded in a frame, Mute the video when the speaker starts to talk, and then proceed to next page

3. Solve a maze

4. From the map of the world select either USA or India and proceed

5. Find clue to hack the image captcha, as the whole purpose of captcha is script should not be allowed to bypass it

6. Generate a token by sending a request to websocket

13 November 16:00 Hrs

Cleared challenge 1st and 2nd , and took a break to proceed with other daily routine work

Code for 1st challenge - Proceed button

Code for 2nd challenge - youtube video embedded in a frame

13 November, 18:00 to 21:00 Hrs

Attempted Maze solver but did not succeed

Had dinner watching Young Sheldon series and resumed working on the maze solver problem at 22:00 hrs

By 00.00, realised that, on every execution, there was only 2 possibility of maze, hence hard-coded the both the maze depending upon the entry point in the maze, and it worked like a charm for all executions.

Code for Maze challenge -

Next, started to gather thoughts around solving image captcha, found a library called Tesseract.js to convert images to text in javascript,

Tried converting the base64 string to image file and then to text, but library was unable to convert that successfully, also cleansed the image using multiple technique but nothing was working out

around 02:00 in the morning, some clues were shared around all levels and for captcha, it was mentioned, "Things arent always what they appear", so I stared exploring the dev tools options in the browser and found that, every captcha image was already coming as part of browsers console log, All I had to do was, take the captcha text from the console log to proceed, and I did that exactly

14 November, 04:00 Hrs

send a request to Websocket for token and proceed

Code for Websocket

14 November, 05:00 Hrs

All challenges completed and started refactoring of code, adding reports and building up Readme file for anyone to be able to run tests easily.

Comments