Robot not waiting for ready in SAP

Hello,

So I have not experienced this problem before, usually the robots I have worked on have been good about waiting for SAP to load data (some t codes can take awhile to pull up information). However, I have been testing a robot I made to pull up customer invoices on a daily basis. I am about a week into testing and I have run into a problem for the first time. In this case there were a large number of invoices for this one customer so it took a little longer than usual, but SAP is clearly in a loading state. It is not guaranteed every customer I search will have invoices so I have an element exists and an if statement to work through the dialogue boxes depending on if there are invoices or not. So I ran the debug on this workflow and noticed that the workflow within a few seconds will run the element exist activity, which causes it to get stuck once SAP finishes loading the invoices, then the next activity fails due to selector problems (since it couldn’t click out of the dialogue boxes).

Any one have any idea why it suddenly isn’t waiting for SAP to load? and any suggestions? Much appreciated.

Edit: So this issue occurred yesterday evening. I ran it this morning and there were more invoices for the problem customer today than there were yesterday and yet it ran fine! Can someone suggest why it is being so inconsistent and maybe how to handle it.

Hello.

My first thought is that you need to increase the TimeoutMS on the activity which waits for it to load. The default value is 30secs, which could be too short if the load time is inconsistent for you.

If it’s something else, then it would be more helpful if you showed some of your workflow or screenshots.

Regards.

Hmmm… that may be something to consider. Is there a way to adjust timeout on a global setting? I know some people use a timeout variable defined in the config but I didn’t do that in this project, which means I will have to do it retroactively. I don’t want to accidentally forget something!

You can store the timeout globally like that in a config file or global variable, but you don’t want the same timeout for every activity. For many activities you will want somewhat short and some you will want a timeout of even 0. The TimeoutMS just waits that long til an exception is thrown. So, if the element is expected to be on the screen prior to the activity then use a 0, so the exception is thrown fast. Or if there is some loading time, then increase the TimeoutMS appropriately.

So, if you do this globally, then you would want like 5 different variables I think, so you can use them for a variety of timeouts.

Hmmmmmmm yes another good point, I’ll have to consider doing some Timeout variables and selecting appropriately in future projects.

That said, like I wrote in the OP the robot worked fine today. So, I can’t really test if it is a timeout problem or if there is something else wrong. But I think I am going to go ahead with the assumption it is timing out and seeing if it occurs again with these changes made.

Thanks!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.