如何使用「ABQ」選擇輸入元素。在xpath下面不起作用。Xpath使用標籤外的文本定位元素
//div[contains(text(),'Pick-up')]/following::label/input[contains(text(),'ABQ')]
樣品輸入(編輯爲OP)
<div class="col-xs-2 profile-location-panal profile-pickupLocationPanel">
<!--Locations-->
<div class="panel panel-default" ng-class="{'panel-invalid':isSaveProfileClicked&&profileInformationForm.locations.$error.required}">
<div class="panel-heading">Pick-up Locations</div>
<div class="panel-body">
<div class="panalScroll">
<div class="checkbox">
<label>
<input type="checkbox" ng-click="toggleAllLocations()" ng-checked="checkLocationsAll()">All
</label>
</div>
<!-- ngRepeat: item in pickUpLocations --><div class="checkbox ng-scope" ng-repeat="item in pickUpLocations">
<label class="ng-binding">
<input name="locations" required="required" type="checkbox" ng-required="selected.pickUpLocations.length==0" checklist-value="item.code" checklist-model="selected.pickUpLocations">
ABQ
</label>
http://i.stack.imgur.com/R3K9H.jpg
你能提供一些HTML輸入示例嗎? –
<標籤類=「NG結合」> \t <輸入名稱=「位置」清單模型=「selected.pickUpLocations」> \t ABQ – nvntkmr