Having trouble figuring out how to target an element that lacks a standard unique id or class. How can I locate this input element using Protractor?
Please note that I am unable to use the ComboBoxInput_Default
class because it is shared across multiple page elements. Additionally, there is no clearly identifiable parent element within at least 10+ DOM levels.
<div style="display:inline; white-space: nowrap;" id="ctl00_ctl31_g_b56afa08_7869_450c_8871_f6759a89d9b1_ctl00_WPQ3txtFields_ddPositioList_10_Solution_MultiComboSelection" class="ComboBox_Default">
<input type="text" style="width: 133px; height: 15px;" delimiter=";" class="ComboBoxInput_Default" value="-select-" name="ctl00$ctl31$g_b56afa08_7869_450c_8871_f6759a89d9b1$ctl00$WPQ3txtFields_ddPositioList_10_Solution_MultiComboSelection_Input" id="ctl00_ctl31_g_b56afa08_7869_450c_8871_f6759a89d9b1_ctl00_WPQ3txtFields_ddPositioList_10_Solution_MultiComboSelection_Input" autocomplete="off">
<div>
The only distinctive attribute that sets apart each of these inputs is tacked onto the end of the generated id, which is
Solution_MultiComboSelection_Input
.
If I had to select this element with jQuery, I would resort to the (not ideal) contains method like
$( "input[name*='Solution_MultiComboSelection_Input']" )
. Is there a similar approach in Protractor for locating elements in this manner?