Help with web pages ID's changing all the time on tests

How to apply eValid to functional testing of web applications.

Help with web pages ID's changing all the time on tests

Postby McDaniel » Wed May 23, 2018 10:53 am

Afternoon.

I need some advice on the following:

Help in creating tests in pages where ID's are changing dynamically!

Any ideas?

Thanks
McDaniel
 
Posts: 1
Joined: Wed May 23, 2018 10:50 am

Re: Help with web pages ID's changing all the time on tests

Postby eValid » Thu May 24, 2018 11:38 am

McDaniel wrote:Afternoon.

I need some advice on the following:

Help in creating tests in pages where ID's are changing dynamically!

Any ideas?

Thanks


Great post McDaniel.

Indeed, tests of web pages where the ID tags are generated dynamically, can be very tricky.

There is no hard and fast rule on this kind of page, but the basic approach that eValid uses is base the test on finding page elements by NOT using the ID tags at all.

Here is a good example, using Google's gmail web client as an example of an application that uses dynamic ID tags:

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

In some cases we use a "geometric" trick, which means that we know (from experimenting with the page details) that a particular element is a fixed distance in the DOM tree away from an element that has a property that is time-invariant.

You can see this in in Step 2, where the mouse click is done on a DOM element that is 4 index-values above the one that contains the "Compose mail" string.

(This is a workable solution, but we do admit that it is brittle -- it will need to be adjusted if/when the page layout structure changes).


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


Return to Desktop and Mobile Device Functional Testing

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