The Supply Chain Challenge page released as a part of Bot Games: Bot Wars represents a bit of a step-up in the difficulty. You have to work with multiple web applications, as well as use an XLSX to lookup data. Were you able to get a working solution? If so, great! If not, that’s okay too! We’re going to show you one of the approaches to solve this challenge page and discuss some other approaches that can help further improve your times.
Take a look at the video above for the full challenge walk-through. We’ll outline a couple of pointers below as well as some additional times for maximizing your speed if you want to see how fast you can complete the challenge.
If you’ve looked at any of our other solution tutorials, you know that we’re REALLY big on using steps to frame out the major tasks that a bot must complete…then working backward a bit to go fill in the code for each step. Using steps can help developers to create logical groupings/separations in their code, as well as provide a basic “skeleton” of logic so they know exactly what actions need to be added to each section. Steps also improve the readability of your code in the case that you’re working alongside other developers, or are showing the bot to business users who may not need to see every detail of the bot’s operations.
The Supply Chain challenge requires developers to interface with multiple web applications: the main challenge page itself + the Procurement Anywhere web app. Fortunately, using the recorder package makes handling these two different pages at the same time relatively straightforward. In fact its so easy, you may have missed exactly how Automation Anywhere is able to tell these sessions apart. It’s actually driven by the Window title field that is set up when doing your recordings. The Window Title gives Automation Anywhere the details it needs to know which button/field/table you’re looking to interact with, and from which exact browser window you want to use.
Pro Tip: If you’re using a page that has titles that are frequently updated as you navigate around a web app, consider using an asterisk (*) as a wild card in the title. This allows your bot to be bit more dynamic in the specific browser session that its looking to take action on. Changing page titles are quite common in many online market places, as well as HR apps where you might go from “Team Details – Workday” to a page that is named after a specific employee as you’ve clicked into their profile “Steve Rogers – Employee Details – Workday”.
Reading from a table is different than just reading from any normal input field. With a true HTML table, the Recorder package gives expanded options for interacting with a table, including reading the whole table, getting or searching for cell values, etc. While there are technically a few different ways to read data from a table, our tutorial above went with the approach of ‘Get cell Text by Index’…which works perfectly fine for our use case of only grabbing 3 values. If we needed to read a significant amount of data from the table (more than 1 row or more than just a couple of specific values), using the Get Table action would enable us to read the data of the table to a data table variable type – where we could dynamically reference any cells/rows as needed.
The tutorial above shows one of the most straightforward way to complete this challenge – especially for those without extensive programming/scripting backgrounds. Should you want to explore the use of some alternate approaches to investigate their impact on processing times, there are several modifications you could try:
Part of the fun of building bots is learning about all the different ways the same problem can be solved in different ways. And while this challenge was a bit more complex than other challenges we’ve created – but we hope you still had a good time completing it. Explore how you may use different packages/actions to complete the challenge – noting what impact those changes have on the processing time, accuracy, and overall stability of your bot. Because all of these challenge pages are hosted in the Automation Anywhere developer portal – use these as a “playground” to try out new packages, approaches, and techniques that you can perfect, and take back to the bots you may build for your work or personal life. Finally – Bot Games week 3 is just around the corner – be sure to check back to the Bot Games page of the developer portal to see the challenge page released for 8/16!