Question

Openspan Robotics - How to interrogate controls where ID is dynamic

Hi Team,

How do we Interrogate and match the controls and use it in Automation if the HTML name or ID of the control is dynamically generated on each refresh or session. For example, the below control has the name and ID property Suffixed by a number which keeps changing on each refresh or session.

  1. <input name="ext-comp-1444" tabindex="12" class="x-form-cb-input" id="radio-1445-inputEl" aria-disabled="false"
  2. aria-hidden="false" aria-invalid="false" aria-describedby="radio-1445-ariaStatusEl" hidefocus="true"
  3. type="radio" autocomplete="off" data-ref="inputEl" data-componentid="radio-1445" data-errorqtip="">

Comments

Keep up to date on this post and subscribe to comments

Pega
October 14, 2019 - 12:16pm

Without seeing the whole page it is hard to answer definitively. You usually can turn of ElementID matching and use the ElementClass match rule. In your instance above it looks like that may possibly be unique.

October 16, 2019 - 8:52am

Hi, 

By disabling the ElementID and using ElementClass match rule also, the correct controls are not getting highlighted.

For eg. In the attached screenshot, when I'm trying to interrogate the text box corresponding to "HOA Fee Frequency" it is showing an error that "txt_ListingServiceType is already interrogated". FYI, "txt_ListingServiceType" is another text box interrogated previously, using ElementClass Match rule and disabling ElementID. 

We tried using Attribute Value Match Rule, Inner HTML, Element Path, Element Index and Element Inner Text as well. 

Is there any other approach that can be followed?

Thank you