What happens if eValid can't find an element on a page

Discussion of the technology underlying the eValid solution.

What happens if eValid can't find an element on a page

Postby SNavarro » Mon Nov 17, 2014 8:42 pm

Evening.

If I run a search using eValid's IndexFindElement command what happens if the element isn't found?

Thanks
SNavarro
 
Posts: 1
Joined: Mon Nov 17, 2014 8:40 pm

Re: What happens if eValid can't find an element on a page

Postby eValid » Tue Nov 18, 2014 1:43 pm

SNavarro wrote:Evening.

If I run a search using eValid's IndexFindElement command what happens if the element isn't found?

Thanks


Good question, thanks for asking SNavarro.

The sourceIndex value, whatever it is, is NOT changed.

The EventLog will show a FAIL command.

But it may be more complicated: Maybe the browser has not fully parsed the HTML so that the DOM tree is incomplete.

Hence, we generally do something like this: Delay 10 in front of the search command. That's 10 millisecond delay (0.01 seconds) usually is enough to allow the browser to fully create a complete DOM.

This is usually enough for theIndexFindElement command:

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

Then if the search fails it really IS because the searched for item isn't there.

However, if you are searching for a Regular Expression match, using the IndexFindElementEx the situation may be different:

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

The search now is going to take a long time, but the "settling time for the page is the same."

That is, you can still use: Delay 10 to provide the needed delay.

Some testers prefer a longer "safety factor," and use: Delay 100 to slow things down by 0.1 seconds.

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


Return to Technology

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