0
<hs-details-item>
<hs-label>Location</hs-label>
<hs-value-block>
<hs>
<hs-text-box ng-class="{'disabled': isAmenityPosting }" class="required" input-control="{title:'Location', okCallback:setJobSite, value:jobSiteName,
autocomplete:{ values:getJobSiteList, reload: true }, ss:'location'}">
<i class="icon-room"></i><span hs-placeholder="Select Location" class="ng-binding"></span>
</hs-text-box>
</hs>
<hs>
<!-- ngIf: isBarcodeShow() --><hs-button ng-class="{'disabled': soCreating }" class="barcode-special-btn smaller ng-scope" ng-if="isBarcodeShow()" hs-gesture="{handler:startScan, param: onBarcodeScanCompleted}"><i class="icon-br-code"></i></hs-button><!-- end ngIf: isBarcodeShow() -->
</hs>
</hs-value-block>
</hs-details-item>
方案:點擊「位置」欄... 什麼是從上面的代碼片段拿出在量角器命令,選擇「位置」字段的最佳方法? 可以通過不使用Xpath來完成嗎?在量角器選擇現場
@ alecxe ...謝謝你這麼多..它的工作.. – Kevin
@ alecxe,使用Xpath創建自動化腳本是否有缺點? – Kevin
@Kevin,[量角器風格指南](https://github.com/angular/protractor/blob/master/docs/style-guide.md#never-use-xpath)指示不使用XPath,但是,從我的觀點是,這個陳述過於強硬,而應該是一個建議,因爲在適當的情況下會有某些用例,就像這種情況一樣。 – alecxe