g***@pnmac.com
2018-04-19 17:41:54 UTC
Hi. Trying to display the innertext of the 3 SPAN classes, but I am getting error message. My eventual goal is to write a line of code to SELECT the value "servicing executive dashboard". My .vbs code is:
wscript.echo oIE.Document.getElementById("RefreshReportName-selectized").getElementsByTagName("span")(1).innerText
Website code is as follows:
<form class="uk-form-horizontal">
<div class="uk-margin">
<label class="uk-form-label" for="rptNameArch">Report Name</label>
<div class="uk-form-controls">
<select tabindex="-1" class="selectized" id="RefreshReportName" style="display: none;">
<option selected="selected" value=""></option></select>
<div class="selectize-control single">
<div class="selectize-input items has-options not-full">
<input tabindex="-32768" id="RefreshReportName-selectized" style="left: 0px; width: 148.21px; position: relative; opacity: 1;" type="text"
placeholder="Select Report to Archive" autocomplete="off">
</div>
<div class="selectize-dropdown single" style="left: 0px; top: 40px; width: 749.75px; display: none; visibility: visible;">
<div class="selectize-dropdown-content">
<div class="option selected" data-selectable="" data-value="20291">
<span class="highlight">Servicing</span>
<span class="highlight">Executive</span>
<span class="highlight">Dashboard</span>
</div></div></div></div>
Can someone tell me what I am doing wrong?
Thanks
wscript.echo oIE.Document.getElementById("RefreshReportName-selectized").getElementsByTagName("span")(1).innerText
Website code is as follows:
<form class="uk-form-horizontal">
<div class="uk-margin">
<label class="uk-form-label" for="rptNameArch">Report Name</label>
<div class="uk-form-controls">
<select tabindex="-1" class="selectized" id="RefreshReportName" style="display: none;">
<option selected="selected" value=""></option></select>
<div class="selectize-control single">
<div class="selectize-input items has-options not-full">
<input tabindex="-32768" id="RefreshReportName-selectized" style="left: 0px; width: 148.21px; position: relative; opacity: 1;" type="text"
placeholder="Select Report to Archive" autocomplete="off">
</div>
<div class="selectize-dropdown single" style="left: 0px; top: 40px; width: 749.75px; display: none; visibility: visible;">
<div class="selectize-dropdown-content">
<div class="option selected" data-selectable="" data-value="20291">
<span class="highlight">Servicing</span>
<span class="highlight">Executive</span>
<span class="highlight">Dashboard</span>
</div></div></div></div>
Can someone tell me what I am doing wrong?
Thanks