If the index search fails to find a result

Applying eValid to AJAX applications that require advanced DOM-based methods.

If the index search fails to find a result

Postby MRussell » Wed Apr 19, 2017 11:55 am

Afternoon.

What happens in eValid if an index search command doesn't find a result.

What can I do to resolve this error?

Thanks
MRussell
 
Posts: 1
Joined: Wed Apr 19, 2017 11:43 am

Re: If the index search fails to find a result

Postby eValid » Thu Apr 20, 2017 12:38 pm

MRussell wrote:Afternoon.

What happens in eValid if an index search command doesn't find a result.

What can I do to resolve this error?

Thanks


A good question MRussell.

There are two main commands for searching the DOM:

IndexFindElement
IndexFindElementEx

will throw an ERROR flag if the command fails to find the element that you are looking for.

You can set an OnError command to catch this kind of failure.

However, you should prepare and prevent errors of this kind by first assuring synchronization when testing AJAX, using commands like the following:

http://www.evalid.us/Products/Documenta ... n.dom.html

This will have the advantage that the page you are search will have arrived and be fully stabilized BEFORE you search the location of some particular element you want.

Also, not that in case the search doesn't find a result, then the current value if sourceIndex -- a variable that is know to the script playback context only --- is NOT CHANGED.

This allows you to do a sequence of searches in a row if you want.

-- eValid Support
eValid
 
Posts: 1748
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to AJAX Applications & DOM Processing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons