Can eValid deal with multiple web elements instances

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

Can eValid deal with multiple web elements instances

Postby RhodieC » Mon May 13, 2019 11:47 am

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
RhodieC
 
Posts: 1
Joined: Mon May 13, 2019 11:44 am

Re: Can eValid deal with multiple web elements instances

Postby eValid » Tue May 14, 2019 7:17 am

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
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