Common OATS Issues and Resolutions

During our implementation of OATS, we’ve run into several issues regarding script and server stability. Here are a few of the bigger factors for script stability and the resolutions we came up with.

The majority of script errors we’ve encountered has to do with Wait for Page being recorded to match an index=0 or title=<page name>.  The problem is that every page has an index=0. No matter what page loads (or is already loaded), it will match an index=0.

Therefore, if you think you’re waiting for a page where index=0, the script won’t actually wait for anything but will charge ahead and generate errors, including the following: “Find object timeout,” “Please input at least one character to execute a search,” and “Data for Searchable Object All is not crawled.”

Another common issue has to do with navigation links. When recorded, navigation links typically match on the text value of what was clicked, the href, or an index value. The use of Or logically means that if any one of these matches, the link gets clicked.

However, problems occur when the indexes change and the href=‘#’ or has a hard-coded URL with server/port name, and the text can match more than one text value on the page. Faced with multiple choices, it seems that the script doesn’t go to the same page each time, and if the “Wait for Page” isn’t looking for a specific page the script can go several steps beyond where the error occurred.

This issue can be corrected by using “AND” instead of “OR,” and by matching on unique attributes like ID when possible.  Also, Href=‘#’ should never be used to match. It’s typically used to specify a dummy URL when a javascript “onclick” event will take precedence, and it almost always matches multiple links on a page. So as a rule, Href=‘#’ should be deleted from scripts.

Sometimes, the script needs to navigate to a link specified in a databank. Most of the scripts are set up so that if the databank content isn’t found, it will default to either a link specified in an HREF tag or an index number. This presents a problem because the databank value should be the only one that the script navigates to. Otherwise, the script should fail.

Another issue has to do with the potential for infinite loops. Approximately 30 scripts use a while loop to wait for a page. If the page never appears, the script will loop forever, and the OTM will be prevented from completing. Given the server stability issues and the likelihood of one of these pages going to error instead of returning, this should be corrected.

Leave a Reply

Your email address will not be published. Required fields are marked *