javascript - Is it wrong to put ID's on DOM elements for automation because it would turn their CSS classes into singletons? -


i'm wondering correct way go automation (like selenium) is. told shouldn't put id's on elements, because can lead js errors (if duplicate id's exists) , can cause elements css classes become singletons. agree this, not having ids can make automation pain in rear.

thoughts?

you got pretty bad advice.

the "id" , "class" namespaces distinct. give page elements (unique) "id" values when need find them efficiently , reliably.

(what mean "automation", way, not entirely clear.)


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -