So I have created a robot that basically extracts invoices from SAP. This particular SAP transaction will take the user into an extra confirmation screen to say how many invoices were printed. However, if there are no invoices for a particular customer then SAP doesn’t take you to the confirmation screen. Now, I specifically designed the robot to do each customer separately to make it easier to organize the invoices. So basically I have the robot repeating the same actions X amount of times in order to run each customer (not so many at a time, maybe about 10-20).
I have it currently set up in such a way that if there were no invoices for any customers it will run successfully (i.e. you didn’t go to the next confirmation screen)! However, I am having a hard time thinking about how to deal with the dialogue box that doesn’t always pop up.
So i put the entire flow of clicking through the dialogue box, and backtracking SAP to the previous screen into a sequence. It will be the same for every customer so I basically copy and pasted that sequence into every customer and I have it set to continue on error after 2 seconds. But this is unreliable and if I keep doing this method I will need to probably put a delay of 10 seconds because some customers have a lot of invoices to print and SAP can take some time to confirm that information. However, this is going to be a lot of wasted time. I thought maybe doing a try catch with the catch being the dialogue box sequence, but then I have no idea how to go back to where I left off on the try to continue on.
Any advice would be appreciated.