Page 1 of 1

Is eValid able to tell if an page element is there or not

PostPosted: Thu Aug 29, 2019 8:12 am
by DaveTroy
Morning.

I was wonder if eValid has the ability to know if an element is NOT present in a page?

Thanks

Re: Is eValid able to tell if an page element is there or no

PostPosted: Fri Aug 30, 2019 9:26 am
by eValid
DaveTroy wrote:Morning.

I was wonder if eValid has the ability to know if an element is NOT present in a page?

Thanks


Thanks for posting your element question DaveTroy.

We are assuming you have run a search using the IndexFindElement or IndexFindElementEX commands, as described below:

http://e-valid.com/Products/Documentati ... indElement

http://e-valid.com/Products/Documentati ... nt.ex.html


These commands always start at the current value of "sourceIndex" which present to zero at the start of any playback, and is left at the value of the most recent prior search (with either command) in the same playback.

So, typically (but not necessarily) you first increment the source index by this command:

IndexMove 1

then you do the search for the next object.

If the search commands does not find it then it does NOT change the value of sourceIndex.

If the sourceIndex changes you found something new; if it is unchanged, then that particular element is not in the page at the time you did the search.

The only caveat is that the command requires a constant page...if during the search the page changes -- it can, if it is an AJAX application -- then you may falsely find that the element is there (or not there) when it actually isn't there (or actually is there).

That's the nature of AJAX.

Hope that helps you looks for signs if the element is present or not.


-- eValid Support