Search code examples
rft

Does RFT have equivalent for jQuery .next() ?


I need to make work select in RFT in case the select is done via jQuery AJAX select where the html code looks like

<select style="display: none;" id="_campus_id" name="_campus_id">
  <option id="CAMPUS1" value="1">camp</option>
  <option id="CAMPUS2" value="2">camp2</option>
</select>
<input aria-haspopup="true" aria-autocomplete="list" role="textbox" autocomplete="off" class="ui-autocomplete-input ui-widget ui-widget-content ui-corner-left">
<button aria-disabled="false" role="button" class="ui-button ui-widget ui-state-default ui-button-icon-only ui-corner-right ui-button-icon" title="Show All Items" tabindex="-1">
  <span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-s"></span><span class="ui-button-text"> 
  </span>
<button>

I need to "go" to input box and type text then "press" {DOWN} and {ENTER}. I have this part ready but the input box doesn't have any unique id so I want to find the input box based on the select which got property ID.

It would be possible using something like getNext() but I guess it doesn't exist in RFT.

Any other idea how to make this work? In case there are more than one AJAX selects on the page?


Solution

  • Confirmed with IBM support that RFT doen't have any equivalent to jQuery .next() method as per current version. I created a ticket for an enhancement.