Can eValid be used to search for a non-existent element

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

Can eValid be used to search for a non-existent element

Postby JCatron » Thu May 05, 2016 12:32 pm

Afternoon.

Question for you.

In eValid's system, is there any protection against a web page DOM search that doesn't find the sought-for element?

I mean, can you test for "no such element"?

Thanks
JCatron
 
Posts: 1
Joined: Thu May 05, 2016 12:29 pm

Re: Can eValid be used to search for a non-existent element

Postby eValid » Fri May 06, 2016 1:05 pm

JCatron wrote:Afternoon.

Question for you.

In eValid's system, is there any protection against a web page DOM search that doesn't find the sought-for element?

I mean, can you test for "no such element"?

Thanks


Thanks for the question JCatron.

There is a presumption of normal operation that prevails in all eValid analysis steps relative to web pages, and the normal assumption is that if you have started off a search for something and you don't find it then that is some kind of problem.

There are commands that do synchronize on the non-existence of a DOM element property, such as "SyncNotOnElementProperty", which is described here:

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

But in this case you are supposedly waiting for sync to happen when the sought-for value disappears.

So this COULD be used as a kind of "negative search" command.

An important fact to remember is that, when an eValid IndexFindElement or IndexFindElementEX begins the command has a given starting sourceIndex, which could be the default, 0.

By design, if the sought-for element is not found then the current value of sourceIndex is NOT CHANGED.

Here is the main command in question:

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

So, you could, in concept concept, check to see if the sourceIndex value didn't change...that would indicate an unsuccessful search.


-- eValid Support
eValid
 
Posts: 2392
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