What happens to eValid if two elements use the same ID tags

General discussion about eValid, its characteristis and applications.

What happens to eValid if two elements use the same ID tags

Postby Gabrila » Mon Apr 06, 2015 12:51 pm

Afternoon:

What happens if two elements have the same ID?

How can eValid distinguish the two elements?

Thanks
Gabrila
 
Posts: 1
Joined: Mon Apr 06, 2015 12:48 pm

Re: What happens to eValid if two elements use the same ID t

Postby eValid » Tue Apr 07, 2015 10:11 am

Gabrila wrote:Afternoon:

What happens if two elements have the same ID?

How can eValid distinguish the two elements?

Thanks


Thanks for posting Gabrila,

You raise a very good point.

ID tags are supposed to be unique, but, guess what, they often are not.

And this non-uniqueness can befuddle the software test unless you do the right thing.

Clearly, this case calls for use of the structural testing features of eValid, described in summary here:

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

When you have TWO ID tags that have identical names, you will need to identify the first one, using a command sequence like this:

IndexSet 0
IndexFIndElement ID=non-unique-name

This always finds the first one on the page.

To find the second one you write:

IndexMove +1
IndexFIndElement ID=non-unique-name

First, the current sourceIndex is moved up one and then the search proceeds and when it finds the second instance of the non-unique-name'd ID tag eValid's sourceIndex will be pointing at the second one.

From there you can take any action you want.

Here are the resources available to you at this point:

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

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


Return to General Solution Topics

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