Set ID to bootstrap/JQuery object for Automation testing -


some background: doing ui automation scripting, object id,

for eg, <input id="primaryaddress_streetname" maxlength="20" name="primaryaddress.streetname" type="text" value="" />

to locate textbox , perform action through automated scripts.

similarly, application testing developed in asp.net , have validation messages , popover messages implemented through bootstrap , jquery js file.

since created on fly there no way our developer thinks can give id objects. means, see bootstrap messages when view source code, don't corresponding html tag. when asked developer, said it's driven src javascript files.

sample js file code,

if (propertytypeid == 2) {   var content = 'note:  cannot have more 8 rental units in total , no more 4 rental units own in 1 structure.';   $(this).popover({ title: 'rental note', content: content, trigger: 'manual' });   $(this).popover('show'); 

i wondering if there way can set id objects automation tool (testcomplete) can detect , me in writing automated scripts test application.

i think best solution in case mapping these objects manually text or other properties can identify object uniquely. use name mapping functionality of testcomplete along required children , extended find features.


Comments