If eValid searches the DOM but can't find anything

General discussion about eValid, its characteristis and applications.

If eValid searches the DOM but can't find anything

Postby PaulJB » Mon Mar 28, 2022 9:45 am

Hi.

I was wondering, what happens when the eValid command that tries to search the DOM doesn't find
anything?

Is that an error?
PaulJB
 
Posts: 1
Joined: Mon Mar 28, 2022 9:40 am

Re: If eValid searches the DOM but can't find anything

Postby eValid » Tue Mar 29, 2022 9:38 am

PaulJB wrote:Hi.

I was wondering, what happens when the eValid command that tries to search the DOM doesn't find
anything?

Is that an error?


Thanks for posting your question PaulJB.

You probably mean the search cmmands, like this:

http://www.e-valid.com/Products/Documen ... ement.html

In this command, if the search doesn't find a match, then the value of "sourceIndex" is left the same as it was before the command was issued.

That there is no "error code" issued is intentional...the goal of eValid scripts is to work, silently.

The presumption is that the page you are working with is constant enough so that you WILL find a match if you look for a value that you KNOW is there.

If not, the thinking is, eValid is better off not doing anything.

In concept you could detect whether "sourceIndex" changed in value by using commands like "IndexSet" and "IndexRead" and using a windows-based comparison.

Our experience is that this very seldom useful.


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


Return to General Solution Topics

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