Hi there, I have been finding objects using the Id string (we use a FindChildByID() method), but this is becoming hard to maintain recently since our app generates IDs more dynamically these days.
We added a "qaid" (quality assurance ID) property, which can be seen with F12 (Tools) in IE or Firebug in Firefox, but not by TestComplete's Object Spy.
How do I get TestComplete to see that property?
Here is an example of how an element looks when using F12 in Internet Explorer:
<span id="ctl00_ContentPlaceHolderMain_Folders_RepeaterF olders_ctl03_CollapsiblePanelFolder" _behaviors="[object Object]" CollapsiblePanelBehavior="[object Object]" qaid="Site Photograph">
So I want to be able to say:
var SitePhotographPanel = WebUtils.FindChildByQAID(this.pageObj, "Site Photograph");
UPDATE: A colleage suggested using EvaluateXPath, so I tried this:
var contentPanel = this.pageObj.EvaluateXPath("//*[@qaid=’Site Photograph’]");
No luck [img]/images/graemlins/frown.gif[/img]
We did something similar. I think what I needed to do (it's been a bit) is use the native web object attributes.
Automated Testing Evangelists
Definition expert - noun - Unknown drip under pressure