Page 1 of 1

Can eValid detect if an element exists on a webpage

PostPosted: Thu Sep 22, 2022 8:35 am
by FCarson
Greetings.

I need to detect whether an element of the current webpage exists, so I hope that eValid does this function?

Thanks

Re: Can eValid detect if an element exists on a webpage

PostPosted: Fri Sep 23, 2022 10:12 am
by eValid
FCarson wrote:Greetings.

I need to detect whether an element of the current webpage exists, so I hope that eValid does this function?

Thanks


Thanks for asking FCarson.

The best way to find if a DOM element exists is to search for it and note whether or not it is found?

Here is the basic DOM search command explained:

http://e-valid.com/Products/Documentati ... ement.html

What happens is that the value of source Index is set to the first instance that the command finds of the "property name" = "property value" in the current page's DOM.

If it doesn't find this, then the internal value of source Index is unchanged from its last value.

You can set the value to Zero with: IndexSet 0 and you can save the value locally on your machine with the command: ValueRead "filename"

You script than compare the value to see if it's changed -- and it will have in case the original search was successful.


-- eValid Support