Bot Games Season 4 Generative AI Edition Solution Tutorial Challenge #3

  • 19 May 2023
  • 0 replies
Bot Games Season 4 Generative AI Edition Solution Tutorial Challenge #3
Userlevel 5
Badge +7

Automation Resiliency Challenge Solution Tutorial



The grand finale is here! After three weeks of groundbreaking challenges, Bot Games Season 4 comes to an epic conclusion. What an unbelievable ride this has been. Did you solve every challenge? We hope you pushed the limits of your skills and imagination with each challenge. The challenges were meant to inspire the very best in automation innovation, and from what we've seen you far surpassed our wildest expectations!

This week - we’re focused in on the Automation Resiliency Challenge though. How can we keep an automation running even in spite of application UI changes? If you didn’t get a chance to check out our intro/explanation of this weeks challenge, we have that here...but our goal for this post is to dive into exactly how we think about solving this challenge and adding resiliency and stability to our automations.

The video above walks through the entire build end to end - so you can build along with us, but we wanted to call out a couple tips on the keys to successfully building an automation capable of keeping up with this challenge page.




We’ve been mentioning Steps as a key to building since Bot Games Season 1. If you aren’t already using steps - you should be. Steps enable developers to start with an outline of how they think about solving a problem, then fill in the details as they go along. For a complex/challenging automation scenario, steps are super helpful in enabling for a way to break down something very large and overwhelming into smaller chunks. These smaller chunks then let you really focus in on the specific task at hand at this point in the automation build. Use steps. They are good for you. They also are a great forcing function to get you to have some structure/commenting around your logic.


Recorder Package


We have to get a bit creative with the use of the Recorder Package in this build as we’ll need to manipulate the Object Properties that the Capture action considers as it attempts to find a target object on a page. That said, this isn’t uncommon for real production-quality automation builds. Dynamic DOMXPaths enable Recorder to interface with different objects on a screen based on where you might be in a loop, on a table, etc. In this case, we use a variable to hold the DOMXPath provided by ChatGPT in order to know “where” on the page each field exists after the field positioning/XPath has changed.


OpenAI Generative AI Package


The OpenAI Generative AI Package is really the brains behind this build (or at least it should be if you built it how we intended 😜). It can work with GPT-4, ChatGPT-3.5 Turbo, and GPT-3 models with both OpenAI and Microsoft Azure service providers to enable your automation to prompt and receive responses from these Large Language Models (LLMs). In the case of this challenge, we’re sending ChatGPT some of the source code of our page, and asking it to identify the DOMXPaths associated with the fields we’re targeting.

The quality of your prompts determine the quality of the responses you can expect to receive from ChatGPT. Spend some time optimizing/refining your prompts if you aren’t getting the results you expect. Further, you may need to actually get more specific with your prompts - telling ChatGPT exactly what you’re looking for as far as a response.

Here’s the prompt from the solution tutorial video above. Feel free to try it out, tweak it, or make improvements:

Find the DOMXPath for Company Name, Email Address, Primary Contact, Customer ID, State, City, Zip, Street Address fields based on the following HTML: . Return this to me as a JSON using the following format:{"Company Name":"//input[@id='XXXXX']","Primary Contact":"//input[@id='XXXXX']","Email Address":"//input[@id='XXXXX']","Customer ID":"//input[@id='XXXXX']","City":"//input[@id='XXXXX']","Zip":"//input[@id='XXXXX']","Street Address":"//input[@id='XXXXX']","State":"//select[@id='XXXXX']"}


Alternative Solutions


The purpose of this challenge was to get users thinking about how Generative AI solutions may be leveraged in their error handling to improve an automation’s ability to “self-heal” in spite of user interface changes. That said, there were many creative approaches to solving this challenge from the community. Are they likely things to implement in a real production automation? You’ll have to be the judge, but they are creative ways to solve this particular challenge.

One approach was to query ChatGPT to ask for a DOMXPath that was dependent on the relationship between the field label and the field itself. In this way, regardless of how the page layout changes, as long as the relationship between the label and the field stays the same - their automation should continue to work.

Another interesting approach was to turn to JavaScript. Instead of using DOMXPath to locate fields, users prompted ChatGPT for the query selector for each field. In turn, you could use the Browser Run JavaScript action or the Web Automation Package from Bot Store to fill in each field value based on the provided query selectors.

These aren’t the only ways to solve this though - which makes Bot Games challenges fun! We all get to learn how others think about solving the same problem. Got an interesting approach that wasn’t mentioned? Leave it in the comments below so others can learn from your approach!


Downloading your Certificate!


Upon completing this challenge, you will be able to download a certificate of completion ( ). In addition, if you have successfully completed all three challenges this season, you can download a Trifecta certificate by using this URL. ( ).




The future is here, and it is automated. Bot Games Season 4 showed us all a glimpse into what's possible when human creativity combines with artificial intelligence. The ingenuity of the participants brought generative AI and automation into harmonic convergence, accomplishing together what neither could do alone.

Our deepest thanks to everyone who joined us on this journey of discovery. You are the pioneers charting the course for organizations ready to embrace the full power of integrated automation. By sharing your wins and lessons with the community, you lit the path ahead so others can follow.

The bots you built this season are more than code and automations - they are the precursors of an automated future where intelligent software lifts us up and helps humankind achieve our greatest ambitions.

Go Be Great!


Unlock all Bot Games Season 4 challenges and resources - visit our Bot Games Season 4 HQ today! 

0 replies

Be the first to reply!