items not found error

26 views
Skip to first unread message

geebee

unread,
Mar 22, 2018, 8:41:44 AM3/22/18
to Twebst
Hi.  I am getting an items(s) not found in <select> html element error. But when I inspect the element, I am getting the following:

<div class="selectize-input items has-options full has-items">
<div class="item" data-value="20111">Test Report Name</div>
<input tabindex="-32222" id="RefreshTESTName-selectized" style="left: -10000px; width: 4px; position: absolute; opacity: 0;" 
type="text" autocomplete="off"></div>

I checked the element id:

<div class="uk-form-controls">
<select id="RefreshTESTName">
<option></option>
</select>
</div>


My code is:
Call browser.FindElement("select", "id=RefreshTESTName").Select("20111") 

I even tried:
Call browser.FindElement("select", "id=RefreshTESTName").Select("Test Report Name") 


Is there something I am missing or another way to go about this?


geebee

unread,
Mar 30, 2018, 9:53:51 AM3/30/18
to Twebst
hi.  if this helps someone help me, i have noticed this when i look further at the website code:

BEFORE a value is selected from the dropdown:
<option value = "22222">ReportName1</option>
<option value = "22233">ReportName2/option>
...

AFTER a value is selected from the dropdown:
<option value = "22222" selected="selected">ReportName1</option>

So I think I am missing something somewhere.  Looks like they are assigning a variable into "selected".. which may come from a hidden field.  If so, how do I trigger all this so that I can change the values of the dropdown.  Can someone please tell me what is going on here?

Thanks

geebee

unread,
Apr 27, 2018, 8:13:53 AM4/27/18
to Twebst
nevermind.  got it.


On Thursday, March 22, 2018 at 7:41:44 AM UTC-5, geebee wrote:
Reply all
Reply to author
Forward
0 new messages