Page 1 of 1

Can eValid deal with multiple web elements instances

PostPosted: Mon May 13, 2019 11:47 am
by RhodieC
Hi.

What happens when eValid encounters a page that has multiple instances of a particular web page element, e.g. "Explore" on www.palava.in?

Thanks

Re: Can eValid deal with multiple web elements instances

PostPosted: Tue May 14, 2019 7:17 am
by eValid
RhodieC wrote:Hi.

What happens when eValid encounters a page that has multiple instances of a particular web page element, e.g. "Explore" on http://www.palava.in?

Thanks


Great question RhodieC, thanks for asking.

It is certainly common enough to have web pages that repeat use of a phrase or word.

That's certainly not wrong.

But if you want to click on, for example, the SECOND one then how do you do that?

To begin with, the command: IndexFindElement (parameters describing element), always starts at SourceIndex (an internally held value) = 0.

The value of SourceIndex when it finds a match is equal to the index of that element.

Unless you tell it to start at some other place, for example, using the command:

IndexSet (number)

That means that this sequence is the SAME as the one above:

IndexSet 0
IndexFindElement (parameters describing element)

All of that being said, the way to always find the SECOND instance is like this:

IndexSet 0
IndexFindElement (parameters describing element)
IndexMove 1
IndexFindElement (parameters describing element)

After which the second search (which starts at the next element after the one where the first element was found) will always find the SECOND instance.

All of the commands you need are describe here:

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

Hope this is of assistance.


-- eValid Support