我正在尝试选择我的P日历元素。
这是一个下拉列表,我想点击打开它。
打开后,我想从列表中选择(clilck)一个值。
但我甚至不能单击下拉元素。
选择下拉元素:
input = element(by.css('p-dropdown[formcontrolname="currId"]'));
这是可行的。
但是现在当你试图点击它的时候:
我收到以下错误:
</p-dropdown> is not clickable at point (841, 415). Other element would receive the click: <a cla
我知道我必须选择标签:
input.$('label').click();
但这也不管用。
</label> is not clickable at point (841, 416). Other element would receive the click: <a class="ui-s
我的p下拉元素:
<p-dropdown formcontrolname="currId" id="currId" inputid="currId" placeholder="NONE"
styleclass="form-control form-control-sm"
class="ng-tns-c6-1 ng-untouched ng-pristine ng-invalid" ng-reflect-filter="true"
ng-reflect-style-class="form-control form-control-sm" ng-reflect-placeholder="NONE"
ng-reflect-input-id="currId" ng-reflect-options="[object Object],[object Object"
ng-reflect-name="currId">
<div class="ng-tns-c6-1 form-control form-control-sm ui-dropdown ui-widget ui-state-default ui-corner-all ui-helper-clearfix"
ng-reflect-klass="form-control form-control-sm"
ng-reflect-ng-class="[object Object]" style="width: 96px;">
<select>
<option class="ng-tns-c6-1 ng-star-inserted" value="AED">AED</option>
<option class="ng-tns-c6-1 ng-star-inserted" value="AUD">AUD</option>
<option class="ng-tns-c6-1 ng-star-inserted" value="BGN">BGN</option>
<option class="ng-tns-c6-1 ng-star-inserted" value="BRL">BRL</option>
<option class="ng-tns-c6-1 ng-star-inserted" value="CAD">CAD</option>
<option class="ng-tns-c6-1 ng-star-inserted" value="CHF">CHF</option>
<option class="ng-tns-c6-1 ng-star-inserted" value="CLP">CLP</option>
<option class="ng-tns-c6-1 ng-star-inserted" value="CNY">CNY</option>
<option class="ng-tns-c6-1 ng-star-inserted" value="COP">COP</option>
</select>
</div>
<div class="ui-helper-hidden-accessible">
<input class="ng-tns-c6-1" readonly="" role="listbox" type="text" id="currId" aria-label=" ">
</div>
<label class="ng-tns-c6-1 ui-dropdown-label ui-inputtext ui-corner-all ui-placeholder ng-star-inserted" ng-reflect-ng-class="[object Object]">NONE</label>
<div class="ui-dropdown-trigger ui-state-default ui-corner-right">
<span class="ui-clickable fa fa-fw fa-caret-down" ng-reflect-klass="ui-clickable" ng-reflect-ng-class="fa fa-fw fa-caret-down"></span>
</div>
<div class="ng-tns-c6-1 ui-dropdown-panel ui-widget-content ui-corner-all ui-shadow ng-trigger ng-trigger-panelState" ng-reflect-ng-class="ui-dropdown-panel ui-widget-co" style="display: none; opacity: 0;">
<div class="ui-dropdown-filter-container ng-tns-c6-1 ng-star-inserted" style="">
<input class="ui-dropdown-filter ui-inputtext ui-widget ui-state-default ui-corner-all" autocomplete="off" type="text">
<span class="fa fa-search"></span>
</div>
<div class="ui-dropdown-items-wrapper" style="max-height: 200px;">
</div>
</div>
</div>
</p-dropdown>
如何选择并单击此项?